diff --git a/build.py b/build.py index fa205de..7e7f790 100644 --- a/build.py +++ b/build.py @@ -97,9 +97,27 @@ def generate_page_html(page_paths): # change file extension for page page = page.split(".md")[0] + ".html" + # get relative path to the stylesheet + css_path = os.path.join( + os.getcwd(), + "content", + "assets", + "styles.css" + ) + relative_css_path = os.path.relpath( + css_path, + start=out_path + ) + # combine path and page out_path = out_path + page + # Update header with the relative stylesheet path + page_components['header'] = page_components['header'].replace( + '', + f'' + ) + # use pypandoc to convert md to html try: converted = pypandoc.convert_file(path, 'html') diff --git a/content/01_under_the_hood/cortical_column_structure.html b/content/01_under_the_hood/cortical_column_structure.html index 170a61c..8224826 100644 --- a/content/01_under_the_hood/cortical_column_structure.html +++ b/content/01_under_the_hood/cortical_column_structure.html @@ -6,7 +6,7 @@