diff --git a/config/_default/params.toml b/config/_default/params.toml index 852c18d8..1e4b3e98 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -18,6 +18,7 @@ enableCodeCopy = false disableImageOptimization = false # defaultBackgroundImage = "IMAGE.jpg" # used as default for background images +# defaultFeaturedImage = "IMAGE.jpg" # used as default for featured images in all articles # highlightCurrentMenuArea = true # smartTOC = true diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml index 2f1f1a83..836732b5 100644 --- a/exampleSite/config/_default/params.toml +++ b/exampleSite/config/_default/params.toml @@ -18,6 +18,7 @@ mainSections = ["docs"] disableImageOptimization = false defaultBackgroundImage = "/img/bg.jpg" +#defaultFeaturedImage = "/img/blowfish_logo.png" highlightCurrentMenuArea = true smartTOC = true diff --git a/exampleSite/content/docs/configuration/index.md b/exampleSite/content/docs/configuration/index.md index da01b965..085674ff 100644 --- a/exampleSite/content/docs/configuration/index.md +++ b/exampleSite/content/docs/configuration/index.md @@ -106,7 +106,7 @@ The default file can be used as a template to create additional languages, or re | `dateFormat` | `"2 January 2006"` | How dates are formatted in this language. Refer to the [Hugo docs](https://gohugo.io/functions/format/#gos-layout-string) for acceptable formats. | | `title` | `"Blowfish"` | The title of the website. This will be displayed in the site header and footer. | | `description` | _Not set_ | The website description. This will be used in the site metadata. | -| `copyright` | _Not set_ | A Markdown string for the site footer copyright message can include the placeholder { year } to dynamically insert the current year. If none is provided, Blowfish will automatically generate a copyright string using the site `title`. | +| `copyright` | _Not set_ | A Markdown string for the site footer copyright message can include the placeholder { year } to dynamically insert the current year. If none is provided, Blowfish will automatically generate a copyright string using the site `title`. | | `author.name` | _Not set_ | The author's name. This will be displayed in article footers, and on the homepage when the profile layout is used. | | `author.image` | _Not set_ | Path to the image file of the author. The image should be a 1:1 aspect ratio and placed in the site's `assets/` folder. | | `author.headline` | _Not set_ | A Markdown string containing the author's headline. It will be displayed on the profile homepage under the author's name. | @@ -147,14 +147,15 @@ Many of the article defaults here can be overridden on a per article basis by sp | `disableImageZoom` | `false` | Disables image zoom feature across all the images in the site. | | `disableImageOptimization` | `false` | Disables image resize and optimization features across all the images in the site. | | `defaultBackgroundImage` | _Not set_ | Default background image for both `background` homepage layout and `background` hero style | -| `defaultBackgrouclearndImage` | _Not set_ | Marks menu entries in the main manu when selected | +| `defaultFeaturedImage` | _Not set_ | Default background image for all `featured` images across articles, will be overriden by a local `featured` image. | +| `highlightCurrentMenuArea` | _Not set_ | Marks menu entries in the main manu when selected | | `smartTOC` | _Not set_ | Activate smart Table of Contents, items in view will be highlighted. | | `smartTOCHideUnfocusedChildren` | _Not set_ | When smart Table of Contents is turned on, this will hide deeper levels of the table when they are not in focus. | ### Header -| Name | Default | Description | -| --------------- | --------- | --------------------------------------------------------------------------------- | +| Name | Default | Description | +| --------------- | --------- | ------------------------------------------------------------------------------------------------------------------- | | `header.layout` | `"basic"` | Defines the header for the entire site, supported values are `basic`, `fixed`, `fixed-fill`, and `fixed-fill-blur`. | ### Footer @@ -207,7 +208,7 @@ Many of the article defaults here can be overridden on a per article basis by sp | `article.showWordCount` | `false` | Whether or not article word counts are displayed. | | `article.showComments` | `false` | Whether or not the [comments partial]({{< ref "partials#comments" >}}) is included after the article footer. | | `article.showSummary` | `false` | Whether or not article summaries are displayed on list pages. If a summary is not provided in the [front matter]({{< ref "front-matter" >}}), one will be auto generated using the `summaryLength` parameter in the [site configuration](#site-configuration). | -| `article.sharingLinks` | _Not set_ | Which sharing links to display at the end of each article. When not provided, or set to `false` no links will be displayed. Available values are: "linkedin", "twitter", "reddit", "pinterest", "facebook", "email", "whatsapp", and "telegram" | +| `article.sharingLinks` | _Not set_ | Which sharing links to display at the end of each article. When not provided, or set to `false` no links will be displayed. Available values are: "linkedin", "twitter", "reddit", "pinterest", "facebook", "email", "whatsapp", and "telegram" | ### List diff --git a/exampleSite/resources/_gen/images/bg_hu3d03a01dcc18bc5be0e67db3d8d209a6_2021825_600x0_resize_q75_box.jpg b/exampleSite/resources/_gen/images/bg_hu3d03a01dcc18bc5be0e67db3d8d209a6_2021825_600x0_resize_q75_box.jpg new file mode 100644 index 00000000..41ee786e Binary files /dev/null and b/exampleSite/resources/_gen/images/bg_hu3d03a01dcc18bc5be0e67db3d8d209a6_2021825_600x0_resize_q75_box.jpg differ diff --git a/exampleSite/resources/_gen/images/blowfish_banner_hud8adc593272aed8f1224d3593fe9b187_99792_600x0_resize_box_3.png b/exampleSite/resources/_gen/images/blowfish_banner_hud8adc593272aed8f1224d3593fe9b187_99792_600x0_resize_box_3.png new file mode 100644 index 00000000..14bd2f52 Binary files /dev/null and b/exampleSite/resources/_gen/images/blowfish_banner_hud8adc593272aed8f1224d3593fe9b187_99792_600x0_resize_box_3.png differ diff --git a/exampleSite/resources/_gen/images/blowfish_logo_hu184ea2fa12490a2458ca388a16ab730e_227816_600x0_resize_box_3.png b/exampleSite/resources/_gen/images/blowfish_logo_hu184ea2fa12490a2458ca388a16ab730e_227816_600x0_resize_box_3.png new file mode 100644 index 00000000..7c3e7cc1 Binary files /dev/null and b/exampleSite/resources/_gen/images/blowfish_logo_hu184ea2fa12490a2458ca388a16ab730e_227816_600x0_resize_box_3.png differ diff --git a/layouts/partials/article-link/card.html b/layouts/partials/article-link/card.html index 54eef472..93a4b949 100644 --- a/layouts/partials/article-link/card.html +++ b/layouts/partials/article-link/card.html @@ -13,6 +13,7 @@ {{- $images := $.Resources.ByType "image" -}} {{- $featured := $images.GetMatch "*feature*" -}} {{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}} + {{- if not $featured }}{{ with .Site.Params.defaultFeaturedImage }}{{ $featured = resources.Get . }}{{ end }}{{ end -}} {{- with $featured -}} {{ if $disableImageOptimization }} {{ with . }} diff --git a/layouts/partials/article-link/simple.html b/layouts/partials/article-link/simple.html index 6ed058db..c22846b4 100644 --- a/layouts/partials/article-link/simple.html +++ b/layouts/partials/article-link/simple.html @@ -40,6 +40,7 @@ {{- $images := $.Resources.ByType "image" -}} {{- $featured := $images.GetMatch "*feature*" -}} {{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}} + {{- if not $featured }}{{ with .Site.Params.defaultFeaturedImage }}{{ $featured = resources.Get . }}{{ end }}{{ end -}} {{- with $featured -}} {{ if $disableImageOptimization }} {{ with . }}