diff --git a/.gitignore b/.gitignore index 3df6b55c..c0afe96d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ .hugo_build.lock +.hvm +exampleSite/public/ exampleSite/resources/ exampleSite/.hugo_build.lock diff --git a/README.md b/README.md index 18755077..d90594d5 100644 --- a/README.md +++ b/README.md @@ -205,7 +205,7 @@ Then, edit the `my-first-post.md` file to suit your needs. ### Comments -To enable Disqus comments, set `disqusShortname` in your site's `config.toml`. +To enable Disqus comments, set `services.disqus.shortname` in your site's `hugo.toml`. To use another comments system, provide your own `comments.html` partial in `layouts\partials\comments.html`. diff --git a/exampleSite/config.toml b/exampleSite/hugo.toml similarity index 98% rename from exampleSite/config.toml rename to exampleSite/hugo.toml index 735d6933..9832c77b 100644 --- a/exampleSite/config.toml +++ b/exampleSite/hugo.toml @@ -9,17 +9,20 @@ theme = "hugo-blog-awesome" # This defines how dates are formatted defaultContentLanguage = "en-gb" -# To enable Google Analytics 4 (gtag.js) provide G-MEASUREMENT_ID below. -# To disable Google Analytics, simply leave the field empty or remove the next line -googleAnalytics = '' # G-MEASUREMENT_ID - # Enable emojis globally enableEmoji = true ignoreErrors = ["additional-script-loading-error"] # ignore error of loading additional scripts. +[services] +# To enable Google Analytics 4 (gtag.js) provide G-MEASUREMENT_ID below. +# To disable Google Analytics, simply leave the field empty or remove the next two lines + [services.googleAnalytics] + id = '' # G-MEASUREMENT_ID + # To enable Disqus comments, provide Disqus Shortname below. -# To disable Disqus comments, simply leave the field empty or remove the next line -disqusShortname = '' +# To disable Disqus comments, simply leave the field empty or remove the next two lines + [services.disqus] + shortname = '' # set markup.highlight.noClasses=false to enable code highlight [markup] diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html index 99efc4b8..a5866c82 100644 --- a/layouts/partials/comments.html +++ b/layouts/partials/comments.html @@ -1,4 +1,4 @@ -{{- if .Site.DisqusShortname -}} +{{- if .Site.Config.Services.Disqus.Shortname -}}
{{ template "_internal/disqus.html" . }} {{- end -}} diff --git a/netlify.toml b/netlify.toml index b4511cb1..8a370bb6 100644 --- a/netlify.toml +++ b/netlify.toml @@ -7,7 +7,7 @@ command = "cd exampleSite && hugo --gc --themesDir ../.." [build.environment] - HUGO_VERSION = "0.116.1" + HUGO_VERSION = "0.122.0" HUGO_THEME = "repo" # Deploy Preview context: all deploys generated from