aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc_reform/io_out/hub.d
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2023-06-24 19:51:00 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2023-06-27 17:12:25 -0400
commit3434b91d73562686f35796ccfa7553df7b4307b5 (patch)
tree7748aff77df01520de7af70f87c47528cd5ed6c1 /src/doc_reform/io_out/hub.d
parentocda, fontface internal markup, cleanup & fixes (diff)
html, bespoke homepage, symlink toc.html index.html
- html, bespoke homepage option - html, symlinks toc.html index.html
Diffstat (limited to 'src/doc_reform/io_out/hub.d')
-rw-r--r--src/doc_reform/io_out/hub.d16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/doc_reform/io_out/hub.d b/src/doc_reform/io_out/hub.d
index 92fea80..06c684e 100644
--- a/src/doc_reform/io_out/hub.d
+++ b/src/doc_reform/io_out/hub.d
@@ -166,13 +166,27 @@ template outputHub() {
}
}
template outputHubInitialize() {
+ import std.file;
import doc_reform.io_out,
doc_reform.io_out.metadata,
doc_reform.io_out.paths_output;
+ string _bespoke_homepage = "./spine-bespoke-output/html/homepage.index.html";
@system void outputHubInitialize(O,I)(
O opt_action,
I program_info
) {
+ if ((opt_action.html || opt_action.html_seg || opt_action.html_scroll)
+ && opt_action.output_dir_set.length > 0
+ && !(opt_action.output_dir_set ~ "/index.html").exists
+ ) {
+ writeln(_bespoke_homepage);
+ if (("./spine-bespoke-output/html/homepage.index.html").exists) {
+ writeln("copy bespoke html homepage\n./spine-bespoke-output/html/homepage.index.html -> ", opt_action.output_dir_set, "/index.html");
+ "./spine-bespoke-output/html/homepage.index.html".copy(opt_action.output_dir_set ~ "/index.html");
+ } else {
+ writeln("place bespoke homepage in ./spine-bespoke-output/html/homepage.index.html");
+ }
+ }
if (
opt_action.latex_document_header_sty
|| (
@@ -187,8 +201,8 @@ template outputHubInitialize() {
program_info.name_version_and_compiler,
program_info.time_output_generated,
);
+ writeln(opt_action.latex);
}
- writeln(opt_action.latex);
}
}
template outputHubOp() {