diff --git a/bin/build.py b/bin/build.py index 166ead2..ec38549 100755 --- a/bin/build.py +++ b/bin/build.py @@ -98,8 +98,10 @@ def generate_html(book, toc): pi = 0 for p in toc: - print(toc[p]['file']) - pagename = toc[p]['file'].replace('.md', '') + # print(toc[p]) + pagename = toc[p]['label'] + pageid = re.sub('[^a-z0-9]+', '-', pagename.lower()) + print(pageid) # files in_f = os.path.join(_BOOK_SRC, toc[p]['file']) @@ -152,7 +154,7 @@ def generate_html(book, toc): # append html story page to template_dom - story_page = BeautifulSoup('
', 'html.parser') + story_page = BeautifulSoup('', 'html.parser') story_page.div.append(output_dom) story_dom.append(story_page)