Allow to disable the footer with params.footer.enable = false
Default is to have the footer enabled (to keep backwards compatibility). The diff looks much worse than it is, I just added a variable and an if clause, but then had to indent the rest of the file. Make footerEnabled an explicit variable. This should improve readability. Use default parameter for even more readability.
This commit is contained in:
parent
78ea0674dd
commit
674156343d
1 changed files with 106 additions and 102 deletions
|
@ -1,3 +1,6 @@
|
|||
{{ $footerEnabled := site.Params.footer.enable | default true }}
|
||||
|
||||
{{ if $footerEnabled }}
|
||||
{{ $author:= site.Data.author }}
|
||||
{{ if (index site.Data site.Language.Lang).author }}
|
||||
{{ $author = (index site.Data site.Language.Lang).author }}
|
||||
|
@ -110,3 +113,4 @@
|
|||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
{{end}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue