aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc_reform/io_out/metadata.d
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2023-06-25 18:18:51 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2023-06-27 17:12:28 -0400
commit9125357297e005a555586c354be18ea03701d342 (patch)
tree0ee41623282ae0e886e227caabde551581d73518 /src/doc_reform/io_out/metadata.d
parenthtml, 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.d27
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">&nbsp;<b>≅</b>&nbsp;≅&nbsp;HOME&nbsp;</a>] ⌘ Curated metadata:
- [<a href="../../authors.html">&nbsp;Authors&nbsp;</a>]
- [<a href="../../topics.html">&nbsp;Topics&nbsp;</a>]</p>
- ┃");
+ metadata_ ~= format(q"┃<p>[<a href="%s">&nbsp;<b>⟰</b>&nbsp;HOME&nbsp;</a>&nbsp;|&nbsp;<a href="../../index.html">&nbsp;≅&nbsp;Collection&nbsp;</a>]&nbsp;&nbsp;[
+ <a href="../../authors.html">&nbsp;&#x1F58B;&nbsp;Authors&nbsp;</a> |
+ <a href="../../topics.html">&nbsp;⌘&nbsp;Topics&nbsp;</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">&nbsp;≅&nbsp;<b>HOME</b>&nbsp;</a>]
+ metadata_ ~= format(q"┃<p>[<a href="../../../index.html">&nbsp;≅&nbsp;<b>HOME</b>&nbsp;</a>&nbsp;<a href="../../index.html">&nbsp;≅&nbsp;Collection&nbsp;</a>]
┃");
}
metadata_ ~= "</div>" ~ inline_search_form(doc_matters) ~ "</div><hr />";