aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/out_metadata.org
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 /org/out_metadata.org
parenthtml, bespoke homepage, symlink toc.html index.html (diff)
replace directory listing, blank index.html
Diffstat (limited to 'org/out_metadata.org')
-rw-r--r--org/out_metadata.org27
1 files changed, 19 insertions, 8 deletions
diff --git a/org/out_metadata.org b/org/out_metadata.org
index aa57303..84c374c 100644
--- a/org/out_metadata.org
+++ b/org/out_metadata.org
@@ -88,12 +88,17 @@ metadata_ ~= format(q"┃<body lang="en" xml:lang="en">
┃");
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 />";
@@ -265,9 +270,15 @@ metadata_write_output(doc_matters, metadata_);
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