From 1ff7f2970b85accb417af0ea5dd350e0ae746dc6 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 26 Jun 2023 20:21:33 -0400 Subject: "empty page" index.html, sort homepage link --- org/out_latex.org | 50 ++++++++++++++++++++++---------------- org/out_metadata.org | 4 ++- org/out_odt.org | 4 ++- org/out_src_pod.org | 4 ++- org/out_xmls.org | 16 +++++++++--- src/doc_reform/io_out/epub3.d | 4 ++- src/doc_reform/io_out/html.d | 12 ++++++--- src/doc_reform/io_out/latex.d | 50 ++++++++++++++++++++++---------------- src/doc_reform/io_out/metadata.d | 4 ++- src/doc_reform/io_out/odt.d | 4 ++- src/doc_reform/io_out/source_pod.d | 4 ++- 11 files changed, 100 insertions(+), 56 deletions(-) diff --git a/org/out_latex.org b/org/out_latex.org index f1fd4bb..6aa1fd6 100644 --- a/org/out_latex.org +++ b/org/out_latex.org @@ -222,7 +222,35 @@ void writeOutputLaTeX(T,M)( auto f = File(pth_latex.latex_path_stuff ~"/index.html", "w"); f.writeln(format_html_blank_page_guide_home( "../../css/html_scroll.css", - "https://sisudoc.org", + (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 + , + "../../index.html", + )); + } + // should be in latex init and done just once, doc_matters not passed there though + 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", + (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, + "../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(format_html_blank_page_guide_home( + "../../css/html_scroll.css", + (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, "../../index.html", )); } @@ -288,26 +316,6 @@ 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(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_metadata.org b/org/out_metadata.org index 5990f16..457fbd1 100644 --- a/org/out_metadata.org +++ b/org/out_metadata.org @@ -292,7 +292,9 @@ metadata_write_output(doc_matters, metadata_); auto f = File(pth_html.base ~"/index.html", "w"); f.writeln(format_html_blank_page_guide_home( "../../css/html_scroll.css", - "https://sisudoc.org", + (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, "../../index.html", )); } diff --git a/org/out_odt.org b/org/out_odt.org index 54c0545..238e99a 100644 --- a/org/out_odt.org +++ b/org/out_odt.org @@ -978,7 +978,9 @@ void writeOutputODT(W,I)( auto f = File(pth_odt.base_pth ~"/index.html", "w"); f.writeln(format_html_blank_page_guide_home( "../../css/html_scroll.css", - "https://sisudoc.org", + (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, "../../index.html", )); } diff --git a/org/out_src_pod.org b/org/out_src_pod.org index 8a6193a..d2f9001 100644 --- a/org/out_src_pod.org +++ b/org/out_src_pod.org @@ -149,7 +149,9 @@ if (!exists(pths_pod.pod_dir_() ~ "/index.html")) { auto f = File(pths_pod.pod_dir_() ~"/index.html", "w"); f.writeln(format_html_blank_page_guide_home( "../../css/html_scroll.css", - "https://sisudoc.org", + (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, "../../index.html", )); } diff --git a/org/out_xmls.org b/org/out_xmls.org index 943d588..7cec142 100644 --- a/org/out_xmls.org +++ b/org/out_xmls.org @@ -2087,7 +2087,9 @@ scroll_write_output(doc, doc_matters); auto f = File(pth_html.base ~"/index.html", "w"); f.writeln(format_html_blank_page_guide_home( "../../css/html_scroll.css", - "https://sisudoc.org", + (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, "../../index.html", )); } @@ -2460,7 +2462,9 @@ seg_write_output(doc_html, doc_html_endnotes, doc_matters); auto f = File(pth_html.css ~"/index.html", "w"); f.writeln(format_html_blank_page_guide_home( "./css/html_scroll.css", - "https://sisudoc.org", + (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, "../index.html", )); } @@ -2502,7 +2506,9 @@ seg_write_output(doc_html, doc_html_endnotes, doc_matters); auto f = File(pth_html.image ~"/index.html", "w"); f.writeln(format_html_blank_page_guide_home( "../css/html_scroll.css", - "https://sisudoc.org", + (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 , "../index.html", )); } @@ -3243,7 +3249,9 @@ zip -0 file.epub mimetype && zip -r -9 file.epub META-INF OEBPS auto f = File(pth_epub3.base ~"/index.html", "w"); f.writeln(format_html_blank_page_guide_home( "../../css/html_scroll.css", - "https://sisudoc.org", + (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, "../../index.html", )); } diff --git a/src/doc_reform/io_out/epub3.d b/src/doc_reform/io_out/epub3.d index c0916f9..d1a4b55 100644 --- a/src/doc_reform/io_out/epub3.d +++ b/src/doc_reform/io_out/epub3.d @@ -644,7 +644,9 @@ template outputEPub3() { auto f = File(pth_epub3.base ~"/index.html", "w"); f.writeln(format_html_blank_page_guide_home( "../../css/html_scroll.css", - "https://sisudoc.org", + (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, "../../index.html", )); } diff --git a/src/doc_reform/io_out/html.d b/src/doc_reform/io_out/html.d index 5f1f11c..d612a76 100644 --- a/src/doc_reform/io_out/html.d +++ b/src/doc_reform/io_out/html.d @@ -257,7 +257,9 @@ template outputHTML() { auto f = File(pth_html.base ~"/index.html", "w"); f.writeln(format_html_blank_page_guide_home( "../../css/html_scroll.css", - "https://sisudoc.org", + (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, "../../index.html", )); } @@ -574,7 +576,9 @@ template outputHTML() { auto f = File(pth_html.css ~"/index.html", "w"); f.writeln(format_html_blank_page_guide_home( "./css/html_scroll.css", - "https://sisudoc.org", + (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, "../index.html", )); } @@ -610,7 +614,9 @@ template outputHTML() { auto f = File(pth_html.image ~"/index.html", "w"); f.writeln(format_html_blank_page_guide_home( "../css/html_scroll.css", - "https://sisudoc.org", + (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 , "../index.html", )); } diff --git a/src/doc_reform/io_out/latex.d b/src/doc_reform/io_out/latex.d index b09eec8..6574ec7 100644 --- a/src/doc_reform/io_out/latex.d +++ b/src/doc_reform/io_out/latex.d @@ -1368,7 +1368,35 @@ template outputLaTeX() { auto f = File(pth_latex.latex_path_stuff ~"/index.html", "w"); f.writeln(format_html_blank_page_guide_home( "../../css/html_scroll.css", - "https://sisudoc.org", + (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 + , + "../../index.html", + )); + } + // should be in latex init and done just once, doc_matters not passed there though + 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", + (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, + "../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(format_html_blank_page_guide_home( + "../../css/html_scroll.css", + (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, "../../index.html", )); } @@ -1415,26 +1443,6 @@ template outputLaTeXstyInit() { 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(format_html_blank_page_guide_home( - "../../css/html_scroll.css", - "https://sisudoc.org", - "../../index.html", - )); - } } catch (ErrnoException ex) { // handle error } diff --git a/src/doc_reform/io_out/metadata.d b/src/doc_reform/io_out/metadata.d index e5e1c02..2745237 100644 --- a/src/doc_reform/io_out/metadata.d +++ b/src/doc_reform/io_out/metadata.d @@ -343,7 +343,9 @@ string theme_light_1 = format(q"┃ auto f = File(pth_html.base ~"/index.html", "w"); f.writeln(format_html_blank_page_guide_home( "../../css/html_scroll.css", - "https://sisudoc.org", + (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, "../../index.html", )); } diff --git a/src/doc_reform/io_out/odt.d b/src/doc_reform/io_out/odt.d index f4a5c49..a573966 100644 --- a/src/doc_reform/io_out/odt.d +++ b/src/doc_reform/io_out/odt.d @@ -2110,7 +2110,9 @@ template outputODT() { auto f = File(pth_odt.base_pth ~"/index.html", "w"); f.writeln(format_html_blank_page_guide_home( "../../css/html_scroll.css", - "https://sisudoc.org", + (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, "../../index.html", )); } diff --git a/src/doc_reform/io_out/source_pod.d b/src/doc_reform/io_out/source_pod.d index 23017ff..f20a887 100644 --- a/src/doc_reform/io_out/source_pod.d +++ b/src/doc_reform/io_out/source_pod.d @@ -134,7 +134,9 @@ template spinePod() { auto f = File(pths_pod.pod_dir_() ~"/index.html", "w"); f.writeln(format_html_blank_page_guide_home( "../../css/html_scroll.css", - "https://sisudoc.org", + (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, "../../index.html", )); } -- cgit v1.2.3