mirror of https://github.com/jpanther/congo.git
Update date.html
When following this [workflow](https://bookdown.org/yihui/blogdown/workflow.html), there is an error when serving the site : ``` Launching the server via the command: /Users/antoinesoetewey/Library/Application Support/Hugo/0.82.0/hugo server --bind 127.0.0.1 -p 4321 --themesDir themes -t congo -D -F --navigateToChanged Error: Error building site: failed to render pages: render of "page" failed: execute of template failed: template: _default/single.html:11:11: executing "main" at <partial "article-meta.html" (dict "context" . "scope" "single")>: error calling partial: execute of template failed: template: partials/article-meta.html:16:36: executing "partials/article-meta.html" at <partial "meta/date.html" .>: error calling partial: "/Users/antoinesoetewey/Documents/GitHub/elsaetantoine/themes/congo/layouts/partials/meta/date.html:2:24": execute of template failed: template: partials/meta/date.html:2:24: executing "partials/meta/date.html" at <.Site.Params.article.dateFormat>: invalid value; expected string ``` By adding these parentheses, the site is served without any error. Regards, Antoinepull/66/head
parent
7f9b2cbc61
commit
5c9438e952
|
@ -1,10 +1,10 @@
|
||||||
<time datetime="{{ .Date }}">
|
<time datetime="{{ .Date }}">
|
||||||
{{- .Date.Format .Site.Params.article.dateFormat | default "2 January 2006" -}}
|
{{- .Date.Format (.Site.Params.article.dateFormat | default "2 January 2006") -}}
|
||||||
</time>
|
</time>
|
||||||
{{ if .Params.showDateUpdated | default (.Site.Params.article.showDateUpdated | default false) }}
|
{{ if .Params.showDateUpdated | default (.Site.Params.article.showDateUpdated | default false) }}
|
||||||
(Updated:
|
(Updated:
|
||||||
<time datetime="{{ .Lastmod }}">
|
<time datetime="{{ .Lastmod }}">
|
||||||
{{- .Lastmod.Format .Site.Params.article.dateFormat | default "2 January 2006" -}}
|
{{- .Lastmod.Format (.Site.Params.article.dateFormat | default "2 January 2006") -}}
|
||||||
</time>
|
</time>
|
||||||
)
|
)
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Reference in New Issue