mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-01-22 14:35:43 -06:00
✨ Default featured image
This commit is contained in:
parent
ca81165e93
commit
53e6a6a45b
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
|
||||
|
|
|
@ -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 |
|
||||
| --------------- | --------- | --------------------------------------------------------------------------------- |
|
||||
| --------------- | --------- | ------------------------------------------------------------------------------------------------------------------- |
|
||||
| `header.layout` | `"basic"` | Defines the header for the entire site, supported values are `basic`, `fixed`, `fixed-fill`, and `fixed-fill-blur`. |
|
||||
### Footer
|
||||
|
||||
|
|
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