def generate_post_pages(): """ Generate "/page/<int>" pages """ for i in range(1, _post_page_count + 1): post_page_dir = os.path.join(_deploy_dir, 'page', str(i)) os.makedirs(post_page_dir) with open(os.path.join(post_page_dir, 'index.html'), 'w', encoding='utf-8') as f: f.write(handler.page(i))
def page(page_id): return handler.page(page_id)