diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2023-06-26 15:37:43 -0400 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2023-06-27 17:12:45 -0400 |
commit | 82d94b3ff78285afaa212d6e0a364f59c2938316 (patch) | |
tree | fb0b1d801054149419f08091ed4c31e5d559e2c2 /org | |
parent | replace directory listing, blank index.html (diff) |
replace some instances of dir listing, index.html
Diffstat (limited to 'org')
-rw-r--r-- | org/default_paths.org | 3 | ||||
-rw-r--r-- | org/out_latex.org | 26 | ||||
-rw-r--r-- | org/out_odt.org | 16 | ||||
-rw-r--r-- | org/out_src_pod.org | 8 | ||||
-rw-r--r-- | org/out_xmls.org | 46 |
5 files changed, 94 insertions, 5 deletions
diff --git a/org/default_paths.org b/org/default_paths.org index 40269d5..9791b67 100644 --- a/org/default_paths.org +++ b/org/default_paths.org @@ -1575,6 +1575,9 @@ template spinePathsLaTeXsty() { auto out_pth() { return spineOutPaths!()(output_dir); } + string base() { + return (((out_pth.output_root).chainPath("latex")).asNormalizedPath).array; + } string base_sty() { return (((out_pth.output_root).chainPath("latex").chainPath("sty")).asNormalizedPath).array; } diff --git a/org/out_latex.org b/org/out_latex.org index d1b6aff..f1fd4bb 100644 --- a/org/out_latex.org +++ b/org/out_latex.org @@ -217,8 +217,14 @@ void writeOutputLaTeX(T,M)( } } if (!exists(pth_latex.latex_path_stuff ~ "/index.html")) { + import doc_reform.io_out.html_snippet; + mixin htmlSnippet; auto f = File(pth_latex.latex_path_stuff ~"/index.html", "w"); - f.writeln(""); + f.writeln(format_html_blank_page_guide_home( + "../../css/html_scroll.css", + "https://sisudoc.org", + "../../index.html", + )); } } catch (ErrnoException ex) { // handle error @@ -282,9 +288,25 @@ void writeOutputLaTeXstyStatic( auto f = File(pth_latex.latex_document_header_sty(filename), "w"); f.writeln(latex_sty); } + if (!exists(pth_latex.base ~ "/index.html")) { + import doc_reform.io_out.html_snippet; + mixin htmlSnippet; + auto f = File(pth_latex.base ~"/index.html", "w"); + f.writeln(format_html_blank_page_guide_home( + "../css/html_scroll.css", + "https://sisudoc.org", + "../index.html", + )); + } if (!exists(pth_latex.base_sty ~ "/index.html")) { + import doc_reform.io_out.html_snippet; + mixin htmlSnippet; auto f = File(pth_latex.base_sty ~"/index.html", "w"); - f.writeln(""); + f.writeln(format_html_blank_page_guide_home( + "../../css/html_scroll.css", + "https://sisudoc.org", + "../../index.html", + )); } } catch (ErrnoException ex) { // handle error diff --git a/org/out_odt.org b/org/out_odt.org index 2f24159..54c0545 100644 --- a/org/out_odt.org +++ b/org/out_odt.org @@ -973,8 +973,14 @@ void writeOutputODT(W,I)( } } if (!exists(pth_odt.base_pth ~ "/index.html")) { + import doc_reform.io_out.html_snippet; + mixin htmlSnippet; auto f = File(pth_odt.base_pth ~"/index.html", "w"); - f.writeln(""); + f.writeln(format_html_blank_page_guide_home( + "../../css/html_scroll.css", + "https://sisudoc.org", + "../../index.html", + )); } } catch (ErrnoException ex) { // Handle error @@ -1070,8 +1076,14 @@ void dirtree(I)( pth_odt.base_pth.mkdirRecurse; } if (!exists(pth_odt.base_pth ~ "/index.html")) { + import doc_reform.io_out.html_snippet; + mixin htmlSnippet; auto f = File(pth_odt.base_pth ~"/index.html", "w"); - f.writeln(""); + f.writeln(format_html_blank_page_guide_home( + "../../css/html_scroll.css", + "https://sisudoc.org", + "../../index.html", + )); } // return 0; } diff --git a/org/out_src_pod.org b/org/out_src_pod.org index b59b217..8a6193a 100644 --- a/org/out_src_pod.org +++ b/org/out_src_pod.org @@ -144,8 +144,14 @@ if (doc_matters.opt.action.source_or_pod) { } } if (!exists(pths_pod.pod_dir_() ~ "/index.html")) { + import doc_reform.io_out.html_snippet; + mixin htmlSnippet; auto f = File(pths_pod.pod_dir_() ~"/index.html", "w"); - f.writeln(""); + f.writeln(format_html_blank_page_guide_home( + "../../css/html_scroll.css", + "https://sisudoc.org", + "../../index.html", + )); } #+END_SRC diff --git a/org/out_xmls.org b/org/out_xmls.org index febee54..33f2213 100644 --- a/org/out_xmls.org +++ b/org/out_xmls.org @@ -23,6 +23,52 @@ 2023 #+END_SRC +* html snippet +** _module template_ :module: + +#+HEADER: :tangle "../src/doc_reform/io_out/html_snippet.d" +#+HEADER: :noweb yes +#+BEGIN_SRC d +<<doc_header_including_copyright_and_license>> +module doc_reform.io_out.html_snippet; +template htmlSnippet() { + import + std.file, + std.outbuffer, + std.format, + std.uri, + std.conv : to; + import + doc_reform.io_out.rgx, + doc_reform.meta.rgx_files, + doc_reform.io_out.rgx_xhtml; + auto format_html_blank_page_guide_home()( + string css_style, + string home_url, + string collection_home_path + ) { + auto html_blank_default = format(q"┃<!DOCTYPE html> +<html> + <head> + <meta http-equiv="Content-Type" content="text/plain; charset=UTF-8" /> + <link href="%s" rel="stylesheet" /> + </head> + <body> + <p class="heading"> + <a href="%s">⟰ </a> + <a href="%s"> ≅ </a> + </p> + </body> +</html>┃", + css_style, + home_url, + collection_home_path + ); + return html_blank_default; + } +} +#+END_SRC + * xml offspring (xhtml html epub) ** format xhtml objects :format: *** _module template_ :module: |