diff options
-rw-r--r-- | exampleSite/config.toml | 5 | ||||
-rw-r--r-- | layouts/partials/header.html | 8 |
2 files changed, 13 insertions, 0 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 3062229..d438020 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -8,6 +8,11 @@ description = "A clean Hugo theme for websites" # logoimage = "images/logo.jpg" # copyright = "foo" +# mathjax = "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML" +## Uncomment if you want mathjax enabled. The above cdn source is taken from https://gohugo.io/content-management/formats/#mathjax-with-hugo + + + [permalinks] blog = "/blog/:year/:month/:title/" diff --git a/layouts/partials/header.html b/layouts/partials/header.html index cc8f8a8..4e519a2 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -5,6 +5,14 @@ <link rel="stylesheet" href="{{ .Site.BaseURL }}css/crab.css"> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=0.5, maximum-scale=3.0"> {{ .Hugo.Generator }} + + + + {{ if isset .Site.Params "mathjax"}} + <script type="text/javascript" src="{{ .Site.Params.mathjax }}"> + </script> + {{end}} + </head> <body> |