From 869731e9de7e697ebbd02a4feead678a1e8ff2ba Mon Sep 17 00:00:00 2001 From: Attila Greguss Date: Wed, 18 Dec 2024 10:30:34 +0000 Subject: [PATCH] Remove context variable and flag in hugo.yaml --- .../content/docs/advanced/customization.md | 19 ++++--------------- layouts/partials/custom/footer.html | 0 layouts/partials/footer.html | 6 +----- 3 files changed, 5 insertions(+), 20 deletions(-) create mode 100644 layouts/partials/custom/footer.html diff --git a/exampleSite/content/docs/advanced/customization.md b/exampleSite/content/docs/advanced/customization.md index 24b847d..af39dff 100644 --- a/exampleSite/content/docs/advanced/customization.md +++ b/exampleSite/content/docs/advanced/customization.md @@ -64,24 +64,13 @@ layouts/partials/custom/head-end.html ## Custom Footer Section -You can add a custom section the footer between the language/theme buttons and the Copyright/Powered By section by creating a file `layouts/partials/custom/footer.html` in your site __and__ setting `customSection: true` in the `footer` section of your `hugo.yaml`: +You can add a custom section the footer between the language/theme buttons and the Copyright/Powered By section by creating a file `layouts/partials/custom/footer.html` in your site. -```yaml {filename="hugo.yaml"} - footer: - enable: true - customSection: true - # These settings are still respected - displayCopyright: false - displayPoweredBy: true - # This setting applies to the custom section - with: "wide" +```html {filename="layouts/partials/custom/footer.html"} + ``` -Variables available in the footer are: - -- `{{ .footerButtonColor }}` - The color/background color of a footer button - -_Note: The custom footer inherits the default footer background color and text color._ +_Note: The custom footer inherits the default footer background color text color and the `width` setting in `hugo.yaml#footer` section._ ## Custom Layouts diff --git a/layouts/partials/custom/footer.html b/layouts/partials/custom/footer.html new file mode 100644 index 0000000..e69de29 diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 1e391b4..4669961 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -24,15 +24,11 @@
{{- end -}} {{- end -}} - - {{- if .Site.Params.footer.customSection -}}
- {{ partial "custom/footer.html" (dict "context" . "footerButtonColor" "hx-rounded-md hx-transition-colors hover:hx-bg-gray-100 hover:hx-text-gray-900 dark:hover:hx-bg-primary-100/5 dark:hover:hx-text-gray-50" ) }} + {{ partial "custom/footer.html" . }}
-
- {{- end -}}