Files
hyzendust.github.io/themes/hugo-theme-yue/layouts/_partials/footer/copyright.html
2025-11-11 18:07:05 +05:30

13 lines
573 B
HTML

{{- $author := site.Params.footer.copyright.author }}
{{- $yearStart := string site.Params.footer.copyright.yearStart }}
{{- $yearEnd := string (default (now.Format "2006") site.Params.footer.copyright.yearEnd) }}
{{- $yearSpan := "" }}
{{- if not $yearStart }}
{{- /* Use $yearEnd if $yearStart doesn't exist */ -}}
{{- $yearSpan = $yearEnd }}
{{- else if eq $yearStart $yearEnd }}
{{- $yearSpan = $yearEnd }}
{{- else }}
{{- $yearSpan = printf "%s-%s" $yearStart $yearEnd }}
{{- end -}}
<p class="footer__copyright-notice">&copy; {{ $yearSpan }} {{ $author }}</p>