Cleanup shortcode calls

This commit is contained in:
Joe Mooring authored and Joe Mooring committed 2023-11-08 17:05:23 -08:00
1 parent c9247e98d6
commit 903b42ebc9
75 files changed
+196 -196

No files matched your search

+3 -3
View File
@@ -13,7 +13,7 @@ By example, let's use [MathJax] to render a LaTeX mathematical expression:
[MathJax]: https://www.mathjax.org/
{{< code file="contents/physics/lesson-1.md" lang=markdown >}}
{{< code file=contents/physics/lesson-1.md lang=markdown >}}
Albert Einstein’s theory of special relativity expresses
the fact that mass and energy are the same physical entity
and can be changed into each other.
@@ -31,14 +31,14 @@ the kinetic energy (E) of that body.
The shortcode is simple:
{{< code file="layouts/shortcodes/math.html" lang=go-html-template >}}
{{< code file=layouts/shortcodes/math.html lang=go-html-template >}}
{{ trim .Inner "\r\n" }}
{{< /code >}}
Now we can selectively load the required CSS and JavaScript on pages that call the "math" shortcode:
{{< code file="layouts/baseof.html" lang=go-html-template >}}
{{< code file=layouts/baseof.html lang=go-html-template >}}
<head>
...
{{ if .HasShortcode "math" }}