From 2cc37c18bfac417d335f81ed2de3e2c163b53b10 Mon Sep 17 00:00:00 2001 From: Andreas Deininger Date: Fri, 13 Sep 2024 21:37:27 +0200 Subject: [PATCH 1/4] Fix typos Signed-off-by: Andreas Deininger --- CONTRIBUTING.md | 2 +- README.md | 2 +- assets/sass/main.sass | 2 +- exampleSite/.gitignore | 2 ++ exampleSite/.hugo_build.lock | 0 exampleSite/README.md | 2 +- exampleSite/config/_default/params.toml | 8 ++++---- exampleSite/content/about.md | 2 +- exampleSite/content/about.pt.md | 2 +- 9 files changed, 12 insertions(+), 10 deletions(-) create mode 100644 exampleSite/.gitignore delete mode 100644 exampleSite/.hugo_build.lock diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 885456fd..2bae09d1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,7 +10,7 @@ and are **greatly appreciated**! When contributing, especially for the first time, consider starting by [creating an issue](https://github.com/chipzoller/hugo-clarity/issues/new/choose) -so you can get feedback from the maintainers and avoid unncessary work. +so you can get feedback from the maintainers and avoid unnecessary work. **Note:** Hugo Clarity has a [code of conduct](CODE_OF_CONDUCT.md). Please follow it in all your interactions with the project. diff --git a/README.md b/README.md index d266168f..a0c7926a 100644 --- a/README.md +++ b/README.md @@ -710,7 +710,7 @@ customJS = ["js/custom.js"] # Include custom JS files ### Notices -This theme includes functionality to display some "hightlight blocks" - called "notices" using a shortcode. +This theme includes functionality to display some "highlight blocks" - called "notices" using a shortcode. For example, see the shortcode markup below will render as a notice: diff --git a/assets/sass/main.sass b/assets/sass/main.sass index cd7db726..50546f1b 100644 --- a/assets/sass/main.sass +++ b/assets/sass/main.sass @@ -4,7 +4,7 @@ $imagesPath: '{{ printf "../%s" (default "images/" .Site.Params.imagesDir) }}' $iconsPath: '{{ printf "../%s" (default "icons/" .Site.Params.iconsDir) }}' @import 'variables' @import 'override' -// include static fonts only when they're not overriden +// include static fonts only when they're not overridden {{- if ne .Site.Params.customFonts true }} @import 'fonts' {{- end }} diff --git a/exampleSite/.gitignore b/exampleSite/.gitignore new file mode 100644 index 00000000..132a0908 --- /dev/null +++ b/exampleSite/.gitignore @@ -0,0 +1,2 @@ +public/ +resources/ \ No newline at end of file diff --git a/exampleSite/.hugo_build.lock b/exampleSite/.hugo_build.lock deleted file mode 100644 index e69de29b..00000000 diff --git a/exampleSite/README.md b/exampleSite/README.md index 712626b2..63076eb7 100644 --- a/exampleSite/README.md +++ b/exampleSite/README.md @@ -19,5 +19,5 @@ hugo server -t YOURTHEME - A section called `/post/` with sample markdown content - A headless bundle called `homepage` that you may want to use for single page applications. You can find instructions about headless bundles over [here](https://gohugo.io/content-management/page-bundles/#headless-bundle) - An `about.md` that is intended to provide the `/about/` page for a theme demo -6. If you intend to build a theme that does not fit in the content structure provided in this repository, then you are still more than welcome to submit it for review at the [Hugo Themes](https://github.com/gohugoio/hugoThemes/issues) respository +6. If you intend to build a theme that does not fit in the content structure provided in this repository, then you are still more than welcome to submit it for review at the [Hugo Themes](https://github.com/gohugoio/hugoThemes/issues) repository diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml index 65574536..6831fa2f 100644 --- a/exampleSite/config/_default/params.toml +++ b/exampleSite/config/_default/params.toml @@ -79,7 +79,7 @@ mobileNavigation = "left" # if you prefer right change to 'right' # some site owners want to decide how they would like their sites to be introduced users. These settings give you as a site owner to decide how the user will view your site for the first time. -# please note that you cannot enforce both modes at the same time. i.e by enforcing one mode, you priotise it over the other (by setting it to true). enforceDarkMode will be commented out +# please note that you cannot enforce both modes at the same time. i.e by enforcing one mode, you prioritise it over the other (by setting it to true). enforceDarkMode will be commented out # please also not that mode toggle UI will remain in place. That way, if a user prefers darkmode, they can have their way. @@ -125,7 +125,7 @@ languageMenuName = "🌐" # dateFormat = "2006-01-02" # Default to "Jan 2, 2006". # customFonts = false # toggle to true if you want to use custom fonts only. -# The year when ths website was created, this value is used in the copyright +# The year when this website was created, this value is used in the copyright # notice of the footer. # since = 2016 @@ -141,8 +141,8 @@ name = "Jane Doe" [plausible_analytics] enable = false # to enable plausible analytics set to true. websiteDomain = "example.com" # domain name of your website, most cases same as your base url -# plausibleDomain = "plausible.io" # default is set to plausible.io, only required if plausible is selfhosted -# scritpName = "plausible" # default is set to plausible, only required if using a custome name for script +# plausibleDomain = "plausible.io" # default is set to plausible.io, only required if plausible is self hosted +# scriptName = "plausible" # default is set to plausible, only required if using a custom name for script [matomo_analytics] enable = false # To enable matomo analytics change to `true`. diff --git a/exampleSite/content/about.md b/exampleSite/content/about.md index f49aec5c..b31bf1da 100644 --- a/exampleSite/content/about.md +++ b/exampleSite/content/about.md @@ -20,6 +20,6 @@ Hugo is ideal for blogs, corporate websites, creative portfolios, online magazin Hugo is for people who want to hand code their own website without worrying about setting up complicated runtimes, dependencies and databases. -Websites built with Hugo are extremelly fast, secure and can be deployed anywhere including, AWS, GitHub Pages, Heroku, Netlify and any other hosting provider. +Websites built with Hugo are extremely fast, secure and can be deployed anywhere including, AWS, GitHub Pages, Heroku, Netlify and any other hosting provider. Learn more and contribute on [GitHub](https://github.com/gohugoio). diff --git a/exampleSite/content/about.pt.md b/exampleSite/content/about.pt.md index 4b8ee159..c07454b3 100644 --- a/exampleSite/content/about.pt.md +++ b/exampleSite/content/about.pt.md @@ -23,6 +23,6 @@ Hugo is ideal for blogs, corporate websites, creative portfolios, online magazin Hugo is for people who want to hand code their own website without worrying about setting up complicated runtimes, dependencies and databases. -Websites built with Hugo are extremelly fast, secure and can be deployed anywhere including, AWS, GitHub Pages, Heroku, Netlify and any other hosting provider. +Websites built with Hugo are extremely fast, secure and can be deployed anywhere including, AWS, GitHub Pages, Heroku, Netlify and any other hosting provider. Learn more and contribute on [GitHub](https://github.com/gohugoio). From f51875856a8ac98c9eb0b465a595025597520218 Mon Sep 17 00:00:00 2001 From: Andreas Deininger Date: Fri, 13 Sep 2024 22:05:49 +0200 Subject: [PATCH 2/4] 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 }}