Skip to content

Commit

Permalink
Fix deprecation warnings emitted by hugo (#406)
Browse files Browse the repository at this point in the history
  • Loading branch information
deining authored Oct 9, 2024
1 parent 6e5371f commit e151ecb
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 11 deletions.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,21 +113,25 @@ There is the possibility to override the CSS and set your custom styles, overrid
The optional comments system is powered by [Disqus](https://disqus.com). If you want to enable comments, create an account in Disqus and write down your shortname.

```toml
disqusShortname = "devcows"
[services]
[services.disqus]
Shortname = "devcows"
```

You can disable the comments system by leaving the `disqusShortname` empty.
You can disable the comments system by leaving the `Shortname` empty.


### Google Analytics

You can optionally enable Google Analytics. Type your tracking code in the ``.

```toml
googleAnalytics = "UA-XXXXX-X"
[services]
[services.googleAnalytics]
id = "UA-XXXXX-X"
```

Leave the `googleAnalytics` key empty to disable it.
Leave the `id` key empty to disable it.

### Logo

Expand Down
13 changes: 8 additions & 5 deletions exampleSite/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ themesDir = "../.."
languageCode = "en-us"
# Site language. Available translations in the theme's `/i18n` directory.
defaultContentLanguage = "en"
# Enable comments by entering your Disqus shortname
disqusShortname = "devcows"
# Enable Google Analytics by entering your tracking code
googleAnalytics = ""

# number of words of summarized post content (default 70)
summaryLength = 70
Expand All @@ -19,8 +15,15 @@ paginate = 10
# not pluralize title pages by default
pluralizelisttitles = false

[menu]
[services]
[services.disqus]
# Enable comments by entering your Disqus shortname
Shortname = "devcows"
[services.googleAnalytics]
# Enable Google Analytics by entering your tracking code
id = ""

[menu]

# Main menu
[[menu.main]]
Expand Down
2 changes: 1 addition & 1 deletion layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
{{ .Content }}
</div>
<!-- /#post-content -->
{{ if .Site.DisqusShortname }}
{{ if .Site.Config.Services.Disqus.Shortname }}
<div id="comments">
{{ template "_internal/disqus.html" . }}
</div>
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
{{ .Content }}
{{ if .Site.DisqusShortname }}
{{ if .Site.Config.Services.Disqus.Shortname }}
<div class="disqus-comments">
{{ template "_internal/disqus.html" . }}
</div>
Expand Down

0 comments on commit e151ecb

Please sign in to comment.