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 --- 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 ++- 6 files changed, 50 insertions(+), 28 deletions(-) (limited to 'src') 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