From 5a8ca32f3056cd38288cf4ffb8d5151606ec071c Mon Sep 17 00:00:00 2001 From: Jieiku Date: Tue, 31 May 2022 03:07:14 -0700 Subject: Search.js Fix unsafe-inline, Netlify Security Headers --- templates/macros/head.html | 37 ++++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) (limited to 'templates/macros/head.html') diff --git a/templates/macros/head.html b/templates/macros/head.html index f893ef3..4dc5895 100644 --- a/templates/macros/head.html +++ b/templates/macros/head.html @@ -213,13 +213,36 @@ {# https://github.com/KaTeX/KaTeX/ #} {# https://github.com/KaTeX/KaTeX/tree/main/contrib/mathtex-script-type/ #} {%- macro math() %} - {%- if config.extra.math or page.extra.math %} - - - - {%- if config.extra.math_auto_render or page.extra.math_auto_render %} - - +{%- if config.extra.math or page.extra.math %} + + {%- if config.extra.katex_css %}{%- if config.extra.katex_css is matching("^http[s]?://") %} + + {%- else %} + + {%- endif %}{%- endif %} + + {%- if config.extra.katex_js %}{%- if config.extra.katex_js is matching("^http[s]?://") %} + + {%- else %} + + {%- endif %}{%- endif %} + + {%- if config.extra.mathtex_js %}{%- if config.extra.mathtex_js is matching("^http[s]?://") %} + + {%- else %} + + {%- endif %}{%- endif %} + +{%- if config.extra.math_auto_render or page.extra.math_auto_render %} + {%- if config.extra.katex_autorender_js %} + {%- if config.extra.katex_autorender_js is matching("^http[s]?://") %} + + {%- else %} + {%- endif %} {%- endif %} + +{%- endif %} + +{%- endif %} {%- endmacro %} -- cgit v1.3.1