Skip to content

Commit

Permalink
Merge pull request #76 from avenya/dynamic-favicon
Browse files Browse the repository at this point in the history
Add favicon to config file
  • Loading branch information
JugglerX authored Jun 13, 2023
2 parents f91038e + ad41ddf commit b9d7763
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,18 @@ You can edit the logo from the `config.toml`
desktop_height = "36px"
alt = "Serif - A Hugo Business Theme"
```
### Favicon

You can edit the favicon from the `config.toml`

```toml
# config.toml

[params]
google_analytics_id = "UA-XXX-1"
google_tag_manager_id = ""
favicon = "favicon-32x32.svg"
```

### Fonts

Expand Down
1 change: 1 addition & 0 deletions exampleSite/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ title = "Hugo Serif Theme"
# In most cases you will only want to set the google_analytics_id OR the google_tag_manager_id. If you have Google Analytics included in your GTM tags don't put your GA ID here. Otherwise your data might be useless.
google_analytics_id = ""
google_tag_manager_id = ""
favicon = "favicon-32x32.svg"

[params.homepage]
show_contact_box = true # show / hide the contaxt box on the homepage
Expand Down
2 changes: 1 addition & 1 deletion layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>{{ block "title" . }}{{ .Params.meta_title | default (printf "%s - %s" .Title .Site.Title) }}{{ end }}</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/png" href="{{ "favicon-32x32.svg" | relURL }}">
<link rel="icon" type="image/png" href="{{ .Site.Params.favicon | relURL }}">

{{ partial "google-fonts.html" . }}

Expand Down

0 comments on commit b9d7763

Please sign in to comment.