nuwan
November 6, 2023, 6:43am
1
I had this on my theme and it perfectly worked before 1.120
<div id="site-footer-copyright">
<a href="{{ .Site.Params.author.URL }}" target="_blank">
<i class="icon icon-copyright"></i> {{ if .Site.Params.projectStartYear }}{{ .Site.Params.projectStartYear }}-{{ end }}{{ .Site.Params.currentYear }} {{ .Site.Params.author.name }}
</a>
</div>
But now {{ if .Site.Params.projectStartYear }}{{ .Site.Params.projectStartYear }}-{{ end }}{{ .Site.Params.currentYear }}
part is not working but {{ .Site.Params.author.name }}
works.
Any help?
Code: https://github.com/docura/docura/blob/main/layouts/partials/site-footer.html
Thanks
You have commented out the parameter in your site configuration. Is that intentional?
# projectStartYear = 2020
It’s also under the author key:
nuwan
November 6, 2023, 8:17am
4
Yes. On theme, as it is optional if the project start year as this year.
I am using this theme on https://github.com/learning-rust/site/blob/main/config/_default/params.toml though and it has this on params.toml
but Why Rust? · Learning Rust no years get echoed.
That won’t work. It’s under the author key in your site configuration. This has nothing to do with the upgrade.
nuwan
November 6, 2023, 8:26am
6
Oh! Got it! I think I had some misunderstanding about toml and recent update of [author]
made by me has triggered this. Thanks for the help.
system
Closed
November 8, 2023, 8:27am
7
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.