diff --git a/mkdocs/mkdocs b/mkdocs/mkdocs index 495f5307..c3c1ae32 100755 --- a/mkdocs/mkdocs +++ b/mkdocs/mkdocs @@ -55,7 +55,6 @@ def build_statics(config): source_path = os.path.join(source_dir, filename) output_path = os.path.join(output_dir, filename) shutil.copy(source_path, output_path) - #print 'Static:', source_path, '->', output_path def build_html(config): @@ -79,13 +78,13 @@ def build_html(config): source_content = '[TOC]\n\n' + source_content # Generate the HTML from the markdown source - content = markdown.markdown(source_content, extensions=['toc']) + content = markdown.markdown(source_content, extensions=['toc', 'meta']) # Strip out the generated table of contents (toc, content) = content.split('', 1) + + # Post process the generated table of contents into a data structure toc = parse_toc(toc) - # toc = '\n'.join(toc.splitlines()[2:-1]) - # toc = '