hugo-theme-relearn/layouts/partials/shortcodes/math.html

13 lines
499 B
HTML
Raw Normal View History

{{- $page := .page }}
{{- if and (not $page) .context }}
{{- $page = .context }}
{{- warnf "%q: DEPRECATED parameter 'context' for shortcode 'math' found, use 'page' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration/#5180" $page.File.Filename }}
{{- end }}
2022-07-02 12:00:23 +00:00
{{- $content := .content }}
{{- $align := .align | default "center" }}
{{- with $page }}
2022-07-02 12:00:23 +00:00
<span class="math align-{{ $align }}">
{{- $content | safeHTML -}}
</span>
{{- .Store.Set "hasMathJax" true }}
2022-07-02 12:00:23 +00:00
{{- end }}