diff --git a/exampleSite/content/docs/configuration/index.md b/exampleSite/content/docs/configuration/index.md index c0834902..717cd5b5 100644 --- a/exampleSite/content/docs/configuration/index.md +++ b/exampleSite/content/docs/configuration/index.md @@ -137,6 +137,7 @@ Many of the article defaults here can be overridden on a per article basis by sp | `showLikes` | _Not set_ | Whether or not articles and list likes are displayed. This requires firebase integrations to be enabled, look below. | | `robots` | _Not set_ | String that indicates how robots should handle your site. If set, it will be output in the page head. Refer to [Google's docs](https://developers.google.com/search/docs/advanced/robots/robots_meta_tag#directives) for valid values. | | `disableImageZoom` | `false` | Disables image zoom feature across all the images in the site. | +| `defaultBackgroundImage` | _Not set_ | Default background image for both `background` homepage layout and `background` hero style | | `header.layout` | `"basic"` | Defines the header for the entire site, supported values are `basic` and `fixed`. | | `footer.showMenu` | `true` | Show/hide the footer menu, which can be configured in the `[[footer]]` section of the `config/_default/menus.en.toml` file. | | `footer.showCopyright` | `true` | Whether or not to show the copyright string in the site footer. Note that the string itself can be customised using the `copyright` parameter in the [languages configuration](#language-and-i18n). | diff --git a/layouts/partials/hero/background.html b/layouts/partials/hero/background.html index 1bf1e9ef..01893a07 100644 --- a/layouts/partials/hero/background.html +++ b/layouts/partials/hero/background.html @@ -1,6 +1,7 @@ {{- $images := .Resources.ByType "image" -}} {{- $featured := $images.GetMatch "*feature*" -}} {{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}} +{{- if not $featured }}{{ with .Site.Params.defaultBackgroundImage }}{{ $featured = resources.Get . }}{{ end }}{{ end -}} {{- with $featured -}} {{ with .Resize "1200x" }}
@@ -23,4 +24,4 @@ {{ end }} {{ end }} -{{- end -}} \ No newline at end of file +{{- end -}} diff --git a/layouts/partials/home/background.html b/layouts/partials/home/background.html index b750c72c..f96d3fec 100644 --- a/layouts/partials/home/background.html +++ b/layouts/partials/home/background.html @@ -4,9 +4,10 @@