mirror of
https://github.com/Vimux/Mainroad.git
synced 2025-04-02 17:45:02 +02:00
Fix deprecated config params (GA, Disqus) (#355)
As of Hugo 0.120.0, `.Site.disqusShortname` and `.Site.googleAnalytics` are deprecated. Backward
compatible change, new notation supported from Hugo v0.41. See
4ddcf52ccc
This commit is contained in:
parent
4a730e9c6c
commit
f6792dab55
2 changed files with 8 additions and 3 deletions
|
@ -56,8 +56,13 @@ title = "Mainroad"
|
|||
languageCode = "en-us"
|
||||
paginate = "10" # Number of posts per page
|
||||
theme = "mainroad"
|
||||
disqusShortname = "" # Enable Disqus comments by entering your Disqus shortname
|
||||
googleAnalytics = "" # Enable Google Analytics by entering your tracking id
|
||||
disqusShortname = "" # DEPRECATED! Use .Services.Disqus.Shortname
|
||||
googleAnalytics = "" # DEPRECATED! Use .Services.googleAnalytics.ID
|
||||
|
||||
[services.disqus]
|
||||
shortname = "" # Enable Disqus by entering your Disqus shortname
|
||||
[services.googleAnalytics]
|
||||
ID = "" # Enable Google Analytics by entering your tracking ID
|
||||
|
||||
[Author] # Used in authorbox
|
||||
name = "John Doe"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{{ if and .Site.DisqusShortname (index .Params "comments" | default "true") (not .Site.IsServer) }}
|
||||
{{ if and .Site.Config.Services.Disqus.Shortname (index .Params "comments" | default "true") (not .Site.IsServer) }}
|
||||
<section class="comments">
|
||||
{{ template "_internal/disqus.html" . }}
|
||||
</section>
|
||||
|
|
Loading…
Add table
Reference in a new issue