From f51875856a8ac98c9eb0b465a595025597520218 Mon Sep 17 00:00:00 2001 From: Andreas Deininger Date: Fri, 13 Sep 2024 22:05:49 +0200 Subject: [PATCH] Fix errors and warnings Signed-off-by: Andreas Deininger --- exampleSite/config/_default/{config.toml => hugo.toml} | 5 ++++- layouts/partials/comments.html | 2 +- layouts/partials/func/getDefaultLanguage.html | 2 +- layouts/partials/func/getStylesBundle.html | 2 +- layouts/partials/header.html | 2 +- theme.toml | 2 +- 6 files changed, 9 insertions(+), 6 deletions(-) rename exampleSite/config/_default/{config.toml => hugo.toml} (95%) diff --git a/exampleSite/config/_default/config.toml b/exampleSite/config/_default/hugo.toml similarity index 95% rename from exampleSite/config/_default/config.toml rename to exampleSite/config/_default/hugo.toml index b1dbfb87..387c99fd 100644 --- a/exampleSite/config/_default/config.toml +++ b/exampleSite/config/_default/hugo.toml @@ -4,7 +4,7 @@ baseurl = "https://example.com/" # Include trailing slash # title = "Clarity" # Edit directly from config/_default/languages.toml # alternatively, uncomment this and remove `title` entry from the aforemention file. copyright = "Copyright © 2008–2018, Steve Francia and the Hugo Authors; all rights reserved." # canonifyurls = true -paginate = 10 + theme = "hugo-clarity" disqusShortname = "" @@ -22,3 +22,6 @@ series = "series" [outputs] home = ["HTML", "RSS", "JSON"] + +[pagination] + pagerSize = 10 diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html index eb141351..311788ff 100644 --- a/layouts/partials/comments.html +++ b/layouts/partials/comments.html @@ -1,5 +1,5 @@
- {{ if .Site.DisqusShortname }} + {{ if .Site.Config.Services.Disqus.Shortname }} {{ template "_internal/disqus.html" . }} {{ end }} {{ if .Site.Params.utterances }} diff --git a/layouts/partials/func/getDefaultLanguage.html b/layouts/partials/func/getDefaultLanguage.html index e8f55717..45911d36 100644 --- a/layouts/partials/func/getDefaultLanguage.html +++ b/layouts/partials/func/getDefaultLanguage.html @@ -1,5 +1,5 @@ {{ $defaultLanguage := site.LanguageCode }} -{{ if site.IsMultiLingual}} +{{ if hugo.IsMultilingual }} {{ $languages := site.Languages }} {{ $order := slice }} {{ range $languages }} diff --git a/layouts/partials/func/getStylesBundle.html b/layouts/partials/func/getStylesBundle.html index e35c4a5d..09dede67 100644 --- a/layouts/partials/func/getStylesBundle.html +++ b/layouts/partials/func/getStylesBundle.html @@ -1,6 +1,6 @@ {{ $options := (dict "targetPath" "css/styles.css" "outputStyle" "compressed" "enableSourceMap" "true") }} {{ $mainSassFile := "sass/main.sass" }} -{{ $styles := resources.Get $mainSassFile | resources.ExecuteAsTemplate $mainSassFile . | resources.ToCSS $options | resources.Fingerprint "sha512" }} +{{ $styles := resources.Get $mainSassFile | resources.ExecuteAsTemplate $mainSassFile . | css.Sass $options | resources.Fingerprint "sha512" }} {{ return $styles }} \ No newline at end of file diff --git a/layouts/partials/header.html b/layouts/partials/header.html index a348b6ee..8008bf14 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -16,7 +16,7 @@ {{- else }} {{ partial "nav" (dict "context" . "menu" .Site.Menus.main) }} {{- end }} - {{ if .Site.IsMultiLingual }} + {{ if hugo.IsMultilingual }}