Browse Source

Implement MathJax

If a post needs to render math equations, it only has
to include the mathjax.json params.
master
PapaTutuWawa 1 year ago
parent
commit
78b4a745bd
  1. 19
      assets/js/MathJax/MathJax.js
  2. 57
      assets/js/MathJax/config/TeX-AMS_CHTML.js
  3. BIN
      assets/js/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_AMS-Regular.woff
  4. BIN
      assets/js/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Math-Italic.woff
  5. BIN
      assets/js/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Size2-Regular.woff
  6. BIN
      assets/js/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Size3-Regular.woff
  7. BIN
      assets/js/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Size4-Regular.woff
  8. 19
      assets/js/MathJax/jax/output/CommonHTML/autoload/mtable.js
  9. 19
      assets/js/MathJax/jax/output/CommonHTML/fonts/TeX/AMS-Regular.js
  10. 19
      assets/js/MathJax/jax/output/CommonHTML/fonts/TeX/fontdata.js
  11. 19
      assets/js/MathJax/jax/output/CommonHTML/jax.js
  12. 1
      content/blog/2019-07-01-Mainline-Hero.md
  13. 16
      layout/item.html
  14. 6
      layout/list.html
  15. 6
      layout/page.html
  16. 4
      layout/post.html
  17. 4
      mathjax.json
  18. 4
      params.json

19
assets/js/MathJax/MathJax.js
File diff suppressed because it is too large
View File

57
assets/js/MathJax/config/TeX-AMS_CHTML.js
File diff suppressed because it is too large
View File

BIN
assets/js/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_AMS-Regular.woff

BIN
assets/js/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Math-Italic.woff

BIN
assets/js/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Size2-Regular.woff

BIN
assets/js/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Size3-Regular.woff

BIN
assets/js/MathJax/fonts/HTML-CSS/TeX/woff/MathJax_Size4-Regular.woff

19
assets/js/MathJax/jax/output/CommonHTML/autoload/mtable.js
File diff suppressed because it is too large
View File

19
assets/js/MathJax/jax/output/CommonHTML/fonts/TeX/AMS-Regular.js
File diff suppressed because it is too large
View File

19
assets/js/MathJax/jax/output/CommonHTML/fonts/TeX/fontdata.js
File diff suppressed because it is too large
View File

19
assets/js/MathJax/jax/output/CommonHTML/jax.js
File diff suppressed because it is too large
View File

1
content/blog/2019-07-01-Mainline-Hero.md

@ -1,3 +1,4 @@
<!-- params: mathjax.json -->
<!-- title: Mainline Hero Part 0 - Modern Linux For My Galaxy S7 -->
Ever heard of [PostmarketOS](https://postmarketos.org/)? If not, then here's a short summary:

16
layout/item.html

@ -1,11 +1,13 @@
<div class="post-list-item">
<h3><a class="post-title" href="/{{ slug }}.html">{{ title }}</a></h3>
<div class="horizontal-center">
<div class="post-list-item">
<h2><a class="post-title" href="/{{ slug }}.html">{{ title }}</a></h2>
<p><b>&gt; {{ date }}</b></p>
<p><b>&gt; {{ date }}</b></p>
<p class="post-summary">
<div class="quote">
{{ summary }}...
<p class="post-summary">
<div class="quote text">
{{ summary }}...
</div>
</p>
</div>
</p>
</div>

6
layout/list.html

@ -1,3 +1,5 @@
<div class="horizontal">
{{ content }}
<div class="post-list">
<div class="vertical">
{{ content }}
</div>
</div>

6
layout/page.html

@ -13,6 +13,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<link rel="stylesheet" href="{{ page_assets }}/css/main.css" />
<link rel="stylesheet" href="/assets/css/blog.css" />
{{ mathjax_include }}
</head>
<body>
<h1><center><a class="page-title" href="/">papatutuwawa@home:~$</a></center></h1>
@ -25,9 +26,7 @@
</div>
<div class="container">
<div class="vertical">
{{ content }}
</div>
</div>
</body>
@ -36,7 +35,8 @@
<footer>
<center>
Created by <i>PapaTutuWawa</i> with &lt;3 using
<a href="https://github.com/google/roboto">Roboto</a> and
<a href="https://github.com/google/roboto">Roboto</a>,
<a href="https://github.com/RedHatOfficial/Overpass">Overpass</a> and
<a href="https://github.com/sunainapai/makesite">makesite</a>
</center>
</footer>

4
layout/post.html

@ -3,6 +3,10 @@
<article>
<h1>{{ title }}</h1>
<p>// Posted {{ date }}</p>
{{ mathjax_warning }}
{{ content }}
<br />

4
mathjax.json

@ -0,0 +1,4 @@
{
"mathjax_include": "<script type='text/javascript' async src='/assets/js/MathJax/MathJax.js?config=TeX-AMS_CHTML'></script>\n<script type='text/x-mathjax-config'>\nMathJax.Hub.Config({'CommonHTML': {scale: 100}, tex2jax: {inlineMath: [['$','$']]}});</script>",
"mathjax_warning": "<div class='quote'>NOTE: This post uses the JavaScript library MathJax to render math equations</div>"
}

4
params.json

@ -7,5 +7,7 @@
"mastodon_url": "https://fosstodon.org/@polynomdivision",
"email_gpg_url": "https://pki.polynom.me/pubkeys/papatutuwawa.pub",
"email_user": "papatutuwawa",
"email_domain": "polynom.me"
"email_domain": "polynom.me",
"mathjax_include": "",
"mathjax_warning": ""
}
Loading…
Cancel
Save