From 87586f73fc5741070466d189dfab807a190753e5 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 31 Mar 2021 19:41:58 +0200 Subject: add potential to generate custom headers and custom pages --- cli/app/site/export.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cli/app/site/export.py') diff --git a/cli/app/site/export.py b/cli/app/site/export.py index aa74165..4ddd01d 100644 --- a/cli/app/site/export.py +++ b/cli/app/site/export.py @@ -25,6 +25,7 @@ def export_site(opt_graph_path, opt_output_dir=app_cfg.DIR_EXPORTS, opt_build_js # load site index index_html = load_text(join(app_cfg.DIR_STATIC, 'site.html'), split=False) + index_html = index.html.replace('CUSTOM_HEADER', graph.settings.get('custom_header', '')) index_html = index_html.replace('SITE_PATH', '/' + graph.path) # write site JSON data @@ -44,7 +45,8 @@ def export_site(opt_graph_path, opt_output_dir=app_cfg.DIR_EXPORTS, opt_build_js print("Homepage not set! Shift-click a page on the graph to make it the homepage.") session.close() return - write_text(f'', join(graph_dir, 'index.html')) + # write_text(f'', join(graph_dir, 'index.html')) + write_index(graph=graph, page=None, index_html=index_html, fp_out=join(graph_dir, 'index.html')) index_path = "" for page in graph.pages: -- cgit v1.2.3-70-g09d2