Skip to content

Commit

Permalink
#455, add BookFavicon parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-shpak committed Aug 8, 2023
1 parent 1cebd58 commit 16f6203
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
8 changes: 6 additions & 2 deletions exampleSite/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,12 @@ enableGitInfo = true
# You can also specify this parameter per page in front matter.
BookToC = true

# (Optional, default none) Set the path to a logo for the book. If the logo is
# /static/logo.png then the path would be logo.png
# (Optional, default favicon.png) Set the path to a favicon file.
# If the favicon is /static/favicon.png then the path would be favicon.png
# BookFavicon = 'favicon.png'

# (Optional, default none) Set the path to a logo for the book.
# If the logo is /static/logo.png then the path would be logo.png
# BookLogo = 'logo.png'

# (Optional, default none) Set leaf bundle to render as side menu
Expand Down
8 changes: 6 additions & 2 deletions exampleSite/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,12 @@ params:
# You can also specify this parameter per page in front matter.
BookToC: true

# (Optional, default none) Set the path to a logo for the book. If the logo is
# /static/logo.png then the path would be logo.png
# (Optional, default favicon.png) Set the path to a favicon file.
# If the favicon is /static/favicon.png then the path would be favicon.png
# BookFavicon: "favicon.png"

# (Optional, default none) Set the path to a logo for the book.
# If the logo is /static/logo.png then the path would be logo.png
# BookLogo: /logo.png

# (Optional, default none) Set leaf bundle to render as side menu
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/docs/html-head.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

{{- $manifest := resources.Get "manifest.json" | resources.ExecuteAsTemplate "manifest.json" . }}
<link rel="manifest" href="{{ $manifest.RelPermalink }}">
<link rel="icon" href="{{ "favicon.png" | relURL }}" type="image/x-icon">
<link rel="icon" href="{{ .Params.BookFavicon | default "favicon.png" | relURL }}" >

{{- range .Translations }}
<link rel="alternate" hreflang="{{ default .Language.Lang .Site.LanguageCode }}" href="{{ .Permalink }}" title="{{ partial "docs/title" . }}">
Expand Down

0 comments on commit 16f6203

Please sign in to comment.