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 /org/out_xmls.org | |
parent | html, bespoke homepage, symlink toc.html index.html (diff) |
replace directory listing, blank index.html
Diffstat (limited to 'org/out_xmls.org')
-rw-r--r-- | org/out_xmls.org | 41 |
1 files changed, 31 insertions, 10 deletions
diff --git a/org/out_xmls.org b/org/out_xmls.org index d9c4800..febee54 100644 --- a/org/out_xmls.org +++ b/org/out_xmls.org @@ -439,7 +439,7 @@ import ) { string o; string metadata_links = ((doc_matters.opt.action.html_link_curate) - ? format(q"┃<p class="small">[<a href="%s"> ≅ </a>|<a href="%s"> %s </a>|<a href="%sepub/%s.%s.epub"> ◆ </a>|%s%s<a href="%smetadata.%s.html"> ⌘• </a>|<a href="%s../../authors.html"> ⌘A </a>|<a href="%s../../topics.html"> ⌘T </a>]</p>┃", + ? format(q"┃<p class="small"><a href="%s">⟰ </a> [<a href="%s"> %s </a><a href="%sepub/%s.%s.epub"> ◆ </a>%s%s<a href="%smetadata.%s.html"> ⌘• </a>] <a href="%s../../index.html"> ≅ </a>|<a href="%s../../authors.html"> 🖋 </a>|<a href="%s../../topics.html"> ⌘ </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 @@ -458,7 +458,7 @@ import ~ doc_matters.src.filename_base ~ "." ~ doc_matters.src.lng - ~ ".a4.portrait.pdf\"> □ </a>|") + ~ ".a4.portrait.pdf\"> □ </a>") : "", (doc_matters.opt.action.html_link_pdf || doc_matters.opt.action.html_link_pdf_letter) ? ("<a href=\"" @@ -467,12 +467,13 @@ import ~ doc_matters.src.filename_base ~ "." ~ doc_matters.src.lng - ~ ".letter.portrait.pdf\"> □ </a>|") + ~ ".letter.portrait.pdf\"> □ </a>") : "", (type == "seg") ? "../" : "", doc_matters.src.filename_base, (type == "seg") ? "../" : "", (type == "seg") ? "../" : "", + (type == "seg") ? "../" : "", ) : ""); o = format(q"┃<!DOCTYPE html> @@ -2007,9 +2008,15 @@ default: if (!exists(pth_html.base)) { pth_html.base.mkdirRecurse; } - auto f = File(pth_html.fn_scroll(doc_matters.src.filename), "w"); - foreach (o; doc) { - f.writeln(o); + { + auto f = File(pth_html.fn_scroll(doc_matters.src.filename), "w"); + foreach (o; doc) { + 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 @@ -2373,10 +2380,16 @@ default: if (!exists(pth_html.css)) { (pth_html.css).mkdirRecurse; } - auto f = File(pth_html.fn_seg_css, "w"); - f.writeln(css.html_seg); - f = File(pth_html.fn_scroll_css, "w"); - f.writeln(css.html_scroll); + { + auto f = File(pth_html.fn_seg_css, "w"); + f.writeln(css.html_seg); + f = File(pth_html.fn_scroll_css, "w"); + f.writeln(css.html_scroll); + } + if (!exists(pth_html.css ~ "/index.html")) { + auto f = File(pth_html.css ~"/index.html", "w"); + f.writeln(""); + } } catch (ErrnoException ex) { // Handle error } @@ -2409,6 +2422,10 @@ default: } } } + if (!exists(pth_html.image ~ "/index.html")) { + auto f = File(pth_html.image ~"/index.html", "w"); + f.writeln(""); + } } } #+END_SRC @@ -3140,6 +3157,10 @@ zip -0 file.epub mimetype && zip -r -9 file.epub META-INF OEBPS if (!exists(pth_epub3.base)) { pth_epub3.base.mkdirRecurse; } + if (!exists(pth_epub3.base ~ "/index.html")) { + auto f = File(pth_epub3.base ~"/index.html", "w"); + f.writeln(""); + } { /+ debug +/ if (doc_matters.opt.action.debug_do_epub) { if (!exists(pth_epub3.dbg_doc_meta_inf(doc_matters.src.filename))) { |