diff options
Diffstat (limited to 'src/doc_reform/io_out/metadata.d')
-rw-r--r-- | src/doc_reform/io_out/metadata.d | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/src/doc_reform/io_out/metadata.d b/src/doc_reform/io_out/metadata.d index 3fab452..2686d15 100644 --- a/src/doc_reform/io_out/metadata.d +++ b/src/doc_reform/io_out/metadata.d @@ -331,9 +331,15 @@ string theme_light_1 = format(q"┃ if (!exists(pth_html.base)) { pth_html.base.mkdirRecurse; } - auto f = File(pth_html.fn_scroll("metadata." ~ doc_matters.src.filename), "w"); - foreach (o; metadata_) { - f.writeln(o); + { + auto f = File(pth_html.fn_scroll("metadata." ~ doc_matters.src.filename), "w"); + foreach (o; metadata_) { + f.writeln(o); + } + } + if (!exists(pth_html.base ~ "/index.html")) { + auto f = File(pth_html.base ~"/index.html", "w"); + f.writeln(""); } } catch (ErrnoException ex) { // Handle error @@ -372,12 +378,17 @@ string theme_light_1 = format(q"┃ ┃"); metadata_ ~= "<div class=\"flex-menu-bar\"><div class=\"flex-menu-option\">"; if (doc_matters.opt.action.html_link_curate) { - metadata_ ~= format(q"┃<p>[<a href="../../../index.html"> <b>≅</b> ≅ HOME </a>] ⌘ Curated metadata: - [<a href="../../authors.html"> Authors </a>] - [<a href="../../topics.html"> Topics </a>]</p> - ┃"); + metadata_ ~= format(q"┃<p>[<a href="%s"> <b>⟰</b> HOME </a> | <a href="../../index.html"> ≅ Collection </a>] [ + <a href="../../authors.html"> 🖋 Authors </a> | + <a href="../../topics.html"> ⌘ Topics </a>]</p> + ┃", + (doc_matters.opt.action.webserver_url_doc_root.length > 0) + ? doc_matters.opt.action.webserver_url_doc_root + : doc_matters.conf_make_meta.conf.w_srv_data_root_url + , // HOME index.html equivalent _cfg.www_url_doc_root, + ); } else { - metadata_ ~= format(q"┃<p>[<a href="../../../index.html"> ≅ <b>HOME</b> </a>] + metadata_ ~= format(q"┃<p>[<a href="../../../index.html"> ≅ <b>HOME</b> </a> <a href="../../index.html"> ≅ Collection </a>] ┃"); } metadata_ ~= "</div>" ~ inline_search_form(doc_matters) ~ "</div><hr />"; |