diff --git a/build.py b/build.py index 6df9263..fa205de 100644 --- a/build.py +++ b/build.py @@ -1,6 +1,6 @@ # %% import os -import re +# import re import pypandoc from create_page_index import update_page_index from create_navbar import generate_navbar_html diff --git a/content/01_under_the_hood/cortical_column_structure.html b/content/01_under_the_hood/cortical_column_structure.html index 28b9939..0315547 100644 --- a/content/01_under_the_hood/cortical_column_structure.html +++ b/content/01_under_the_hood/cortical_column_structure.html @@ -15,14 +15,14 @@ Human Neocortical Neurosolver


- Preface + Preface diff --git a/content/01_under_the_hood/primary_electric_currents.html b/content/01_under_the_hood/primary_electric_currents.html index 878e943..11a185f 100644 --- a/content/01_under_the_hood/primary_electric_currents.html +++ b/content/01_under_the_hood/primary_electric_currents.html @@ -15,14 +15,14 @@ Human Neocortical Neurosolver


- Preface + Preface diff --git a/content/02_simulating_erps/overview_of_erps.html b/content/02_simulating_erps/overview_of_erps.html index c9c8081..38894e5 100644 --- a/content/02_simulating_erps/overview_of_erps.html +++ b/content/02_simulating_erps/overview_of_erps.html @@ -15,14 +15,14 @@ Human Neocortical Neurosolver


- Preface + Preface diff --git a/content/preface.html b/content/preface.html index aa6b4bb..7ba9b5d 100644 --- a/content/preface.html +++ b/content/preface.html @@ -15,14 +15,14 @@ Human Neocortical Neurosolver


- Preface + Preface diff --git a/create_navbar.py b/create_navbar.py index b40f3b0..e5c6806 100644 --- a/create_navbar.py +++ b/create_navbar.py @@ -36,11 +36,14 @@ def get_relative_paths(path=None): md_pages.update(get_relative_paths(item_path)) else: if not item == "README.md" and item.endswith(".md"): - location = item_path.split(os.getcwd())[1] - location = 'content' + location.split('content')[1] - location = location.split('.md')[0] + '.html' - md_pages[item] = location + # get the relative path for the web content only + location = item_path.split(os.getcwd()+os.sep)[1] + location = location.split(item)[0] + page = item.split("_", 1)[1] + page = page.split(".md")[0] + ".html" + + md_pages[item] = location + page return md_pages def create_page_link(file, label, page_paths, indent):