diff --git a/res/docpdf/make_paper.py b/res/docpdf/make_paper.py
index 168bab5d7..ec096c0b9 100644
--- a/res/docpdf/make_paper.py
+++ b/res/docpdf/make_paper.py
@@ -73,6 +73,9 @@ if __name__ == "__main__":
for file_ in filter(lambda x: x.lower().endswith('.md'), files):
file_list.append(os.path.join(base_dir, file_))
+ #-- then, create the index --#
+ index = '
contents
'
+
#-- then, create the document --#
html = ''
@@ -83,6 +86,11 @@ if __name__ == "__main__":
with open(my_file, 'r') as md:
LOGGER.info("processing file %s" % my_file)
data = md.read()
+
+ # retrieve title
+ pageTitle = data.partition('\n')[0].replace("# ","")
+ pageLink = my_file.replace(os.path.sep, "__"),
+ index += '- %s
' % ( pageLink, pageTitle )
# perform link fixing
data = re.sub(r'\[(.+?)\]\((.+?)\)', fix_links, data)
@@ -94,6 +102,9 @@ if __name__ == "__main__":
markdown.markdown(data, extensions=['nl2br', 'mdx_breakless_lists', GithubFlavoredMarkdownExtension()])
)
+ # finish index
+ index += '
'
+
# build html
final_html = ('''
@@ -282,11 +293,16 @@ if __name__ == "__main__":
for version 0.6
+
+
%s