aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc_reform/io_out/metadata.d
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2022-05-25 16:31:55 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2022-05-27 15:33:38 -0400
commit2eff2b6306cc5db64fa444ae070849ec547f038a (patch)
treed055e971cfdc6e36a296a6d20b3d1fea5747501f /src/doc_reform/io_out/metadata.d
parentsub dependency update, updates D-YAML (diff)
pdf output links, should user choose to have it
Diffstat (limited to 'src/doc_reform/io_out/metadata.d')
-rw-r--r--src/doc_reform/io_out/metadata.d11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/doc_reform/io_out/metadata.d b/src/doc_reform/io_out/metadata.d
index 9d6d57a..e3c04c1 100644
--- a/src/doc_reform/io_out/metadata.d
+++ b/src/doc_reform/io_out/metadata.d
@@ -344,6 +344,7 @@ string theme_light_1 = format(q"┃
}
auto pth_html = spinePathsHTML!()(doc_matters.output_path, doc_matters.src.language);
auto pth_epub = spinePathsEPUB!()(doc_matters.output_path, doc_matters.src.language);
+ auto pth_pdf = spinePathsPDF!()(doc_matters);
auto pth_pod = spinePathsPods!()(doc_matters);
metadata_ ~= format(q"┃<body lang="en" xml:lang="en">
<a name="top" id="top"></a>
@@ -403,7 +404,15 @@ string theme_light_1 = format(q"┃
~ "[<a href=\"" ~ doc_matters.src.filename_base ~ "/toc.html\">"
~ "&nbsp;▤&nbsp;html&nbsp;seg&nbsp;</a>]"
~ "[<a href=\"../../" ~ pth_epub.internal_base ~ "/" ~ doc_matters.src.filename_base ~ "." ~ doc_matters.src.language ~ ".epub\">"
- ~ "&nbsp;◆&nbsp;epub&nbsp;</a>]</p>";
+ ~ "&nbsp;◆&nbsp;epub&nbsp;</a>]";
+ if (doc_matters.opt.action.html_pdf_link) {
+ metadata_ ~= "[<a href=\"../../pdf/"
+ ~ doc_matters.src.filename_base
+ ~ "." ~ doc_matters.src.language ~ ".a4.portrait.pdf\">"
+ ~ "&nbsp;□&nbsp;a4&nbsp;pdf&nbsp;</a>]</p>";
+ } else {
+ metadata_ ~= "</p>";
+ }
if (doc_matters.conf_make_meta.meta.classify_topic_register_arr.length > 0) {
metadata_ ~= "<hr /><p class=\"lev0\">Topics:</p>";
string[] _top = ["", "", "", "", ""];