commit 036062316f7e252458540b36e9d282ffd71d53cf
parent c913486a82086e1519acf0591bb711d28625d141
Author: oscarbenedito <oscar@obenedito.org>
Date:   Sun,  1 Mar 2020 21:48:23 +0100

Removed some Hugo warnings

Diffstat:
Mlayouts/archive/single.html | 4++--
Mlayouts/partials/scripts.html | 4+++-
2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/layouts/archive/single.html b/layouts/archive/single.html @@ -8,13 +8,13 @@ <main> <article> <div class="post-content"> - <h2>Posts ({{ len (where (where .Site.Pages "Dir" "==" "blog/") "IsPage" true) }})</h2> + <h2>Posts ({{ len (where (where .Site.Pages "File.Dir" "==" "blog/") "IsPage" true) }})</h2> {{ range .Site.Params.active_years }} {{ $y := . }} <h4>{{ . }}</h4> <ul> {{ range $.Site.Pages }} - {{ if and (eq .Dir "blog/") (.IsPage) (eq $y (.Date.Format "2006")) }} + {{ if and (eq .File.Dir "blog/") (.IsPage) (eq $y (.Date.Format "2006")) }} <li><a href="{{ .RelPermalink }}">{{ .Title }}</a> ({{ .Date.Format "January 2" }})</li> {{ end }} {{ end }} diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html @@ -1,5 +1,7 @@ {{ $js := resources.Get "js/main.js" | resources.Minify -}} <script type="text/javascript" src="{{ $js.RelPermalink }}"></script> -{{- if eq .File.Ext "pdc" }} +{{- with .File }} +{{- if eq .Ext "pdc" }} <script id="MathJax-script" async src="/js/mathjax/tex-chtml.js"></script> {{- end }} +{{- end }}