aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc_reform/io_out/html.d
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2023-06-25 18:18:51 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2023-06-27 17:12:28 -0400
commit9125357297e005a555586c354be18ea03701d342 (patch)
tree0ee41623282ae0e886e227caabde551581d73518 /src/doc_reform/io_out/html.d
parenthtml, bespoke homepage, symlink toc.html index.html (diff)
replace directory listing, blank index.html
Diffstat (limited to 'src/doc_reform/io_out/html.d')
-rw-r--r--src/doc_reform/io_out/html.d30
1 files changed, 23 insertions, 7 deletions
diff --git a/src/doc_reform/io_out/html.d b/src/doc_reform/io_out/html.d
index 29f7f4e..9e108c6 100644
--- a/src/doc_reform/io_out/html.d
+++ b/src/doc_reform/io_out/html.d
@@ -245,9 +245,15 @@ template outputHTML() {
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
@@ -550,10 +556,16 @@ template outputHTML() {
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
}
@@ -580,6 +592,10 @@ template outputHTML() {
}
}
}
+ if (!exists(pth_html.image ~ "/index.html")) {
+ auto f = File(pth_html.image ~"/index.html", "w");
+ f.writeln("");
+ }
}
}
}