diff options
author | digitalcraftsman <digitalcraftsman@users.noreply.github.com> | 2017-01-20 23:41:20 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-20 23:41:20 +0300 |
commit | 5e8550691145334ad619770eb3a74da7409076da (patch) | |
tree | 2ca3a516fbe4cdb7b39dde0e3855357d1e734aad | |
parent | 728d74c60ccfa7abfe895fa7281b4f3210fd9858 (diff) | |
parent | 7941535f576a17c52862879c300b704fc3441d81 (diff) |
Merge branch 'master' into master
-rw-r--r-- | README.md | 5 | ||||
-rw-r--r-- | exampleSite/config.toml | 1 | ||||
-rw-r--r-- | layouts/partials/article_footer.html | 2 | ||||
-rw-r--r-- | layouts/partials/article_header.html | 5 | ||||
-rw-r--r-- | layouts/partials/footer_js.html | 6 |
5 files changed, 13 insertions, 6 deletions
@@ -109,6 +109,9 @@ You can deactivate them under `params.widgets`: tags = true tag_cloud = true +### Date line + +The date line includes: post date, # of words, approximate reading, time tags and categories. However, if you want certain pages to omit the date line, simply put `nodateline = true` in the front matter for that page. ## Localization (l10n) @@ -130,12 +133,12 @@ Mathematical equations in form of LaTeX or MathML code can be rendered with the You can also print formulas inline. In this case wrap the formula only once with `$`. +If you don't need equations, you can disable MathJax but putting `mathjax = false` in your config.toml. This will prevent clients from unnecessarily downloading the MathJax library. ## Shortcodes Last but not least I included some useful [shortcodes](http://gohugo.io/extras/shortcodes/) to make your life easier. - ### Gallery This way you can include a gallery into your post. Copy the code below into your content file and enter the relative paths to your images. diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 17020b2..c299ded 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -24,6 +24,7 @@ theme = "hugo-icarus-theme" copyright = "Powered by [Hugo](//gohugo.io). Theme by [PPOffice](http://github.com/ppoffice)." avatar = "css/images/avatar.png" logo = "css/images/logo.png" + mathjax = true # set to false to disable MathJax # Format dates with Go's time formatting date_format = "2006-01-02" diff --git a/layouts/partials/article_footer.html b/layouts/partials/article_footer.html index 64d6fcd..739af86 100644 --- a/layouts/partials/article_footer.html +++ b/layouts/partials/article_footer.html @@ -3,7 +3,7 @@ <i class="fa fa-share"></i> {{with .Site.Data.l10n.articles.share}}{{.}}{{end}} </a> - {{ if not (eq .Site.DisqusShortname "") }} + {{ if and (not (eq .Site.DisqusShortname "")) (not .Params.disable_comments) }} <a href="{{ .Permalink }}#disqus_thread" class="article-comment-link"> {{with .Site.Data.l10n.articles.comments}}{{.}}{{end}} </a> diff --git a/layouts/partials/article_header.html b/layouts/partials/article_header.html index e7acf9e..4e57e1c 100644 --- a/layouts/partials/article_header.html +++ b/layouts/partials/article_header.html @@ -5,6 +5,8 @@ </h1> </a> <div class="article-meta"> + + {{ if not .Params.nodateline }} <div class="article-date"> <i class="fa fa-calendar"></i> <time datetime="{{ .Date }}" itemprop="datePublished">{{ .Date.Format .Site.Params.date_format }}</time> @@ -15,8 +17,7 @@ {{ .ReadingTime }} {{ with .Site.Data.l10n.articles.readingtime }}{{.}}{{end}} </div> - - + {{ end }} {{ if isset .Params "categories" }} {{ $categoriesLen := len .Params.categories }} {{ if gt $categoriesLen 0 }} diff --git a/layouts/partials/footer_js.html b/layouts/partials/footer_js.html index 1b31a03..e3abb52 100644 --- a/layouts/partials/footer_js.html +++ b/layouts/partials/footer_js.html @@ -2,12 +2,13 @@ <script src="{{ "fancybox/jquery.fancybox.pack.js" | absURL }}"></script> <script src="{{ "js/script.js" | absURL }}"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/highlight.min.js"></script> -<script>hljs.initHighlightingOnLoad();</script> + {{ range .Site.Params.custom_js }} <script src="{{ . | absURL }}"></script> {{ end }} +<script>hljs.initHighlightingOnLoad();</script> -{{ "<!-- MathJax -->" | safeHTML }} +{{ if .Site.Params.mathjax }} <script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { @@ -15,3 +16,4 @@ MathJax.Hub.Config({ }); </script> <script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> +{{ end }}
\ No newline at end of file |