mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-01-22 14:35:43 -06:00
Merge pull request #685 from nunocoracao/589-default-featured-image
✨ Default featured image
This commit is contained in:
commit
974fbf2687
8 changed files with 10 additions and 5 deletions
|
@ -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
|
||||
|
|
|
@ -18,6 +18,7 @@ mainSections = ["docs"]
|
|||
disableImageOptimization = false
|
||||
|
||||
defaultBackgroundImage = "/img/bg.jpg"
|
||||
#defaultFeaturedImage = "/img/blowfish_logo.png"
|
||||
|
||||
highlightCurrentMenuArea = true
|
||||
smartTOC = true
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 26 KiB |
Binary file not shown.
After Width: | Height: | Size: 31 KiB |
Binary file not shown.
After Width: | Height: | Size: 59 KiB |
|
@ -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 . }}
|
||||
|
|
|
@ -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 . }}
|
||||
|
|
Loading…
Reference in a new issue