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
This commit is contained in:
fennecJ 2021-08-31 23:49:18 +08:00 committed by GitHub
parent cccc98ab2c
commit 0e11c00e1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,9 +51,20 @@
right: 50px;
}}
\begin{document}
\EndPreamble
\Css{.right {
text-align: right;
}}
\begin{flushright}
\href{https://github.com/sysprog21/lkmpg/releases/download/latest/lkmpg.pdf}{Download PDF document}
\end{flushright}
\AtBeginDocument{%
\Configure{@HEAD}{\HCode{
<script async defer src="https://buttons.github.io/buttons.js"></script>
<div class="right">
<a class="github-button" href="https://github.com/sysprog21/lkmpg" data-size="large" aria-label="View on GitHub">View on GitHub</a>
<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>
<br><br>
</div>
\Hnewline}}
}
\begin{document}
\EndPreamble