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

github.com/qqhann/hugo-primer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQiushi Pan <17402261+qqhann@users.noreply.github.com>2019-11-30 19:11:14 +0300
committerGitHub <noreply@github.com>2019-11-30 19:11:14 +0300
commit67c96c7a1db2d437c2d5f648aa1dbb1fc3f499f0 (patch)
tree2dd99b64b0ff599f05c300b84a88b9c4cd5ea4e6
parent216c469ad4d869dce45a92110b7c955f167e6417 (diff)
parent2e1e35a46e8e9f955a044a58bae93a89ac05cee6 (diff)
Merge pull request #35 from cntrump/masterv1.0.2
add variable enableMathJax and fix a build error.
-rw-r--r--README.md2
-rw-r--r--layouts/_default/baseof.html3
-rw-r--r--layouts/index.html2
3 files changed, 5 insertions, 2 deletions
diff --git a/README.md b/README.md
index 4455fbc..dfc2ee6 100644
--- a/README.md
+++ b/README.md
@@ -79,6 +79,8 @@ twitter = "your_twitter_id"
# You can use favicon by addin them manually.
useIcon = true
useTwitterCard = true
+# Use MathJax.js. Disabling site-wide and you still can enable in indivisual pages
+math = true
shareTo = ["Twitter", "Hatena", "Facebook", "Pocket"]
showFooterCredits = true
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index e62a374..a1bc923 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -72,10 +72,11 @@
</div>
</div>
-
+ {{ if or .Params.math ( default true .Site.Params.math ) }}
<!-- Scripts -->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<!-- MathJax -->
<script type="text/x-mathjax-config">MathJax.Hub.Config({ tex2jax: { inlineMath: [['$','$'], ['\\(','\\)']] } });</script>
+ {{ end }}
</body>
</html>
diff --git a/layouts/index.html b/layouts/index.html
index 6ae1362..56ae4df 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -34,7 +34,7 @@
{{ end }}
{{ range .Paginator.Pagers }}
- <a href="{{ .RelPermalink }}">
+ <a href="{{ .URL }}">
{{ .PageNumber }}
</a>
{{ end }}