def generate_category_pages(): """ Generate "/category/<string>" pages """ for c in _categories: category_page_dir = os.path.join(_deploy_dir, 'category', c) os.makedirs(category_page_dir) with open(os.path.join(category_page_dir, 'index.html'), 'w', encoding='utf-8') as f: f.write(handler.category(c))
def category(c): return handler.category(c)