diff options
Diffstat (limited to 'src/doc_reform/io_out/html.d')
-rw-r--r-- | src/doc_reform/io_out/html.d | 30 |
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(""); + } } } } |