forked from gohugoio/hugo
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
markup/rst: use MathJax for rst math output and use short pygments hi…
…ghlighting * As noted in gohugoio#7759, rst2html exports math using the "HTML math.css" formatter by default. This means that any math typeset in reStructuredText is not formatted using MathJax which is not ideal. This commit adds a --math-output parameter configure rst2html to output math ready for MathJax to process. Note that I had to pick a URL for MathJax, but it doesn't end up in the resulting output because the <script> tag is in the header which gets cut out by code further down. * As noted in gohugoio#5349, rst2html can generate HTML with short or long form class names for syntax highlighting. Pygments (via the pygmentize command) seems to generate short form by default without any way to switch this. This means most/any stylesheets for code provided with various themes won't work when using rST output. This can easily be fixed by providing the --syntax-highlight=short flag to rst2html. Fixes: gohugoio#5349 Fixes: gohugoio#7759 Co-authored by: Stephen Finucane <[email protected]> Signed-off-by: Sumner Evans <[email protected]>
- Loading branch information
1 parent
9d96078
commit 3e82a8d
Showing
4 changed files
with
40 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters