diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2023-06-25 18:18:51 -0400 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2023-06-27 17:12:28 -0400 |
commit | 9125357297e005a555586c354be18ea03701d342 (patch) | |
tree | 0ee41623282ae0e886e227caabde551581d73518 /src/doc_reform/io_out/metadata.d | |
parent | html, bespoke homepage, symlink toc.html index.html (diff) |
replace directory listing, blank index.html
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 />"; |