Allow footer configuration (#303)

* 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.

* Allow to enable/disable the "contact me" section in the footer.

Just set `footer.contactMe.enable` in the config. Default is true, for
backwards compatibility.

* Make footer template more consistent.

Enabling footers elements and the newsletter is now managed in the
same place.

* Allow to disable the footer navigation. Default is enabled.

* Allow to disable credentials and copyright notice. Default: enabled

* Footer: Reformat variable initialization for readability.

* Allow providing template for footer

Signed-off-by: hossainemruz <hossainemruz@gmail.com>

Co-authored-by: hossainemruz <hossainemruz@gmail.com>
This commit is contained in:
Kaligule 2021-05-01 23:57:19 +02:00 committed by GitHub
parent ab962d4f4a
commit fc5656c937
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 122 additions and 103 deletions

View file

@ -30,7 +30,8 @@
</div>
<!------- ADD FOOTER ------------>
{{- partial "footer.html" . -}}
{{ $footerTemplate:= site.Params.footer.template | default "footer.html" }}
{{- partial $footerTemplate . -}}
<!------- ADD COMMON SCRIPTS ------->
{{ partial "scripts.html" . }}