refactor templates layout
@see https://gohugo.io/templates/new-templatesystem-overview/
This commit is contained in:
parent
a83f339dc8
commit
230c46411b
102 changed files with 2 additions and 2 deletions
40
layouts/_partials/footer/text.html
Normal file
40
layouts/_partials/footer/text.html
Normal file
|
@ -0,0 +1,40 @@
|
|||
{{- /*
|
||||
Returns the site footer text.
|
||||
|
||||
@params licences_data Site data of licences, indexed by SPDX IDs.
|
||||
@params licence Licence identifier.
|
||||
@params licence_link Manually-defined licence URL. Optional.
|
||||
*/
|
||||
-}}
|
||||
|
||||
<!-- Validation -->
|
||||
|
||||
{{- if ( not ( isset . "author_name" ) ) -}}
|
||||
{{- errorf "No site author defined" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if ( not ( isset . "report_issue_url" ) ) -}}
|
||||
{{- errorf "No 'Report Issue' URL defined" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if ( not ( isset . "privacy_policy_url" ) ) -}}
|
||||
{{- errorf "No 'Privacy Policy' URL defined" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if ( not ( isset . "sitemap_path" ) ) -}}
|
||||
{{- errorf "No sitemap path defined" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if ( not ( isset . "last_build_time" ) ) -}}
|
||||
{{- errorf "No last build time defined" -}}
|
||||
{{- end -}}
|
||||
|
||||
<!-- Rendering -->
|
||||
|
||||
<p>
|
||||
By <a href="/">{{- .author_name -}}</a> |
|
||||
<a href="{{- .report_issue_url -}}">Report an Issue</a> |
|
||||
<a href="{{- .privacy_policy_url -}}">Privacy Policy</a> |
|
||||
<a href="{{- .sitemap_path -}}">Sitemap</a> |
|
||||
Built: {{ .last_build_time -}}
|
||||
</p>
|
Loading…
Add table
Add a link
Reference in a new issue