Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/thomasheller/crab.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsb <banerjee.soumyadipta@gmail.com>2017-08-18 03:18:35 +0300
committersb <banerjee.soumyadipta@gmail.com>2017-08-18 03:18:35 +0300
commit55901ef1e3006fb8cbb29c4f1b58b04dabf3a53a (patch)
tree4085b1e57a92c9f26cd6dbdedc2e7fe46077ed87
parent1f9bb71efac1da75cd4a12b8f9c563a62b7d41c0 (diff)
Added Option to enable Mathjax in the header.
-rw-r--r--exampleSite/config.toml5
-rw-r--r--layouts/partials/header.html8
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>