aboutsummaryrefslogtreecommitdiff
path: root/layouts
diff options
context:
space:
mode:
authorAnthony Wang2024-01-06 22:15:17 -0500
committerAnthony Wang2024-01-06 22:15:42 -0500
commit2f240764ca449656f1fd9bb1a5e0d746d8f59fda (patch)
treefa178b951c52c74fd6fa2a968cceff47db158aad /layouts
parent185411bbaab47fd41f85b242522d16f3695ee0b6 (diff)
Banish rawhtml shortcode, instead write shortcodes for katex, sagecell
Diffstat (limited to 'layouts')
-rw-r--r--layouts/shortcodes/katex.html3
-rw-r--r--layouts/shortcodes/rawhtml.html1
-rw-r--r--layouts/shortcodes/sagecell.html2
-rw-r--r--layouts/shortcodes/sagescript.html3
4 files changed, 8 insertions, 1 deletions
diff --git a/layouts/shortcodes/katex.html b/layouts/shortcodes/katex.html
new file mode 100644
index 0000000..d29aa51
--- /dev/null
+++ b/layouts/shortcodes/katex.html
@@ -0,0 +1,3 @@
+<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.css" integrity="sha384-n8MVd4RsNIU0tAv4ct0nTaAbDJwPJzDEaqSD1odI+WdtXRGWt2kTvGFasHpSy3SV" crossorigin="anonymous">
+<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.js" integrity="sha384-XjKyOOlGwcjNTAIQHIpgOno0Hl1YQqzUOEleOLALmuqehneUG+vnGctmUb0ZY0l8" crossorigin="anonymous"></script>
+<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/contrib/auto-render.min.js" integrity="sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05" crossorigin="anonymous" onload="renderMathInElement(document.body, {delimiters: [{left: '$$', right: '$$', display: true}, {left: '$', right: '$', display: false}, {left: '\\begin{equation}', right: '\\end{equation}', display: true}, {left: '\\begin{align}', right: '\\end{align}', display: true}]});"></script>
diff --git a/layouts/shortcodes/rawhtml.html b/layouts/shortcodes/rawhtml.html
deleted file mode 100644
index 59448a1..0000000
--- a/layouts/shortcodes/rawhtml.html
+++ /dev/null
@@ -1 +0,0 @@
-{{ .Inner }}
diff --git a/layouts/shortcodes/sagecell.html b/layouts/shortcodes/sagecell.html
new file mode 100644
index 0000000..a9ec247
--- /dev/null
+++ b/layouts/shortcodes/sagecell.html
@@ -0,0 +1,2 @@
+<script src="https://sagecell.sagemath.org/static/embedded_sagecell.js"></script>
+<script>sagecell.makeSagecell({"inputLocation": ".sage"});</script>
diff --git a/layouts/shortcodes/sagescript.html b/layouts/shortcodes/sagescript.html
new file mode 100644
index 0000000..339bd8d
--- /dev/null
+++ b/layouts/shortcodes/sagescript.html
@@ -0,0 +1,3 @@
+<div class="sage">
+ <script type="text/x-sage">{{ .Inner }}</script>
+</div>