Skip to content

Commit 0e11c00

Browse files
authored
Add GitHub buttons in rendered HTML (#85)
GitHub buttons are rendered in the generated HTML: one is GitHub project page; another is PDF download. Close #84
1 parent cccc98a commit 0e11c00

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

html.cfg

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,20 @@
5151
right: 50px;
5252
}}
5353

54-
\begin{document}
55-
\EndPreamble
54+
\Css{.right {
55+
text-align: right;
56+
}}
5657

57-
\begin{flushright}
58-
\href{https://github.com/sysprog21/lkmpg/releases/download/latest/lkmpg.pdf}{Download PDF document}
59-
\end{flushright}
58+
\AtBeginDocument{%
59+
\Configure{@HEAD}{\HCode{
60+
<script async defer src="https://buttons.github.io/buttons.js"></script>
61+
<div class="right">
62+
<a class="github-button" href="https://github.com/sysprog21/lkmpg" data-size="large" aria-label="View on GitHub">View on GitHub</a>
63+
<a class="github-button" href="https://github.com/sysprog21/lkmpg/releases/download/latest/lkmpg.pdf" data-icon="octicon-download" data-size="large" aria-label="Download PDF document">Download PDF document</a>
64+
<br><br>
65+
</div>
66+
\Hnewline}}
67+
}
68+
69+
\begin{document}
70+
\EndPreamble

0 commit comments

Comments
 (0)