def create_detail_pages(gen): ensure_clear_dir(os.path.join(gen.site_path, 'projects')) projects_dir = os.path.join(gen.content_path, 'projects') for project_path in all_child_dir_paths(projects_dir): if os.path.isdir(project_path): create_detail_page(project_path, gen)
def create_project_items(gen): projects_dir = os.path.join(gen.content_path, 'projects') items = [create_project_item(path, gen) for path in all_child_dir_paths(projects_dir)] return [i for i in items if i != None]