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:
authorvvveiii <cntrump@gmail.com>2019-10-27 15:16:58 +0300
committervvveiii <cntrump@gmail.com>2019-10-27 15:16:58 +0300
commit4d672b89071f1b858879073034b61f9b5fbe8a97 (patch)
tree5f66769cd0966b4539a147ebb8512af3048ac101
parentdbddabecefd4552ad174240edb91a92f48247107 (diff)
add variable enableMathJax
fix hugo build error: execute of template failed: template: index.html:32:22: executing "main" at <.RelPermalink>: can't evaluate field RelPermalink in type *page.Pager.
-rw-r--r--layouts/_default/baseof.html3
-rw-r--r--layouts/index.html2
2 files changed, 3 insertions, 2 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index e62a374..d6ceffd 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -72,10 +72,11 @@
</div>
</div>
-
+ {{ if .Site.Params.enableMathJax }}
<!-- 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 }}