From d0a330df3f1141f847e2c7963bea754616e51861 Mon Sep 17 00:00:00 2001 From: Andreas Deininger Date: Sun, 16 Feb 2025 22:37:17 +0100 Subject: [PATCH] Fix errors thrown with latest hugo version --- README.md | 4 +-- exampleSite/.gitignore | 1 + exampleSite/.hugo_build.lock | 0 exampleSite/content/blog/go-is-for-lovers.md | 4 +-- .../content/blog/migrate-from-jekyll.md | 6 ++-- exampleSite/{config.toml => hugo.toml} | 28 ++++++++++--------- static/css/style.blue.css | 2 +- static/css/style.default.css | 2 +- static/css/style.green.css | 2 +- static/css/style.marsala.css | 2 +- static/css/style.pink.css | 2 +- static/css/style.red.css | 2 +- static/css/style.turquoise.css | 2 +- static/css/style.violet.css | 2 +- static/js/hpneo.gmaps.js | 2 +- 15 files changed, 32 insertions(+), 29 deletions(-) delete mode 100644 exampleSite/.hugo_build.lock rename exampleSite/{config.toml => hugo.toml} (97%) diff --git a/README.md b/README.md index 3c3051e20..7615fea26 100644 --- a/README.md +++ b/README.md @@ -447,7 +447,7 @@ The meaning of the individual YAML keys is as follows: | --- | ----------- | | `weight` | A means to set the order of multiple features; features with a lower `weight` are displayed first (left to right, top to bottom) | | `name` | The title text below the feature icon; Markdown is supported | -| `icon` | The CSS class of the feature icon; in this example we have used icons powered by [FontAwesome](http://fontawesome.io/icons/) | +| `icon` | The CSS class of the feature icon; in this example we have used icons powered by [FontAwesome](https://fontawesome.com/icons) | | `url` | An optional URL the feature icon should point to; if specified, the icon will become a clickable hyperlink | | `description` | A short text below the title text to describe the feature; Markdown is supported | @@ -618,7 +618,7 @@ The following [HTML metadata](https://www.w3schools.com/tags/tag_meta.asp) can b | `twitter:creator` | `twitter_author` | - | | `twitter:site` | `twitter_site` | `twitter_site` | -Besides, certain [Open Graph](http://ogp.me/) metadata is automatically set: +Besides, certain [Open Graph](https://ogp.me/) metadata is automatically set: - `article:published_time`, `article:modified_time`, `og:updated_time` and `article:expiration_time` are set based on [Hugo's (predefined) front matter variables `date`, `publishDate`, `lastmod` and `expiryDate`](https://gohugo.io/content-management/front-matter/#predefined). - `article:section` and `article:tag` are set based on [Hugo's `categories` and `tags` taxonomies](https://gohugo.io/content-management/taxonomies/#default-taxonomies). Since there can only be one `article:section`, only the first element of the `categories` array is used as `article:section`. diff --git a/exampleSite/.gitignore b/exampleSite/.gitignore index 98478dae7..320b39628 100644 --- a/exampleSite/.gitignore +++ b/exampleSite/.gitignore @@ -1 +1,2 @@ themes/ +.hugo_build.lock diff --git a/exampleSite/.hugo_build.lock b/exampleSite/.hugo_build.lock deleted file mode 100644 index e69de29bb..000000000 diff --git a/exampleSite/content/blog/go-is-for-lovers.md b/exampleSite/content/blog/go-is-for-lovers.md index b5f3ff0a0..f350606c7 100644 --- a/exampleSite/content/blog/go-is-for-lovers.md +++ b/exampleSite/content/blog/go-is-for-lovers.md @@ -331,5 +331,5 @@ so, such as in this example: ``` -[go]: -[gohtmltemplate]: +[go]: +[gohtmltemplate]: diff --git a/exampleSite/content/blog/migrate-from-jekyll.md b/exampleSite/content/blog/migrate-from-jekyll.md index dfe001895..f8e931532 100644 --- a/exampleSite/content/blog/migrate-from-jekyll.md +++ b/exampleSite/content/blog/migrate-from-jekyll.md @@ -46,10 +46,10 @@ The default is for Jekyll to publish to `_site` and for Hugo to publish to `publ ## Convert Jekyll templates to Hugo templates That's the bulk of the work right here. The documentation is your friend. You should refer to [Jekyll's template documentation](http://jekyllrb.com/docs/templates/) if you need to refresh your memory on how you built your blog and [Hugo's template](/layout/templates/) to learn Hugo's way. -As a single reference data point, converting my templates for [heyitsalex.net](http://heyitsalex.net/) took me no more than a few hours. +As a single reference data point, converting my templates for [heyitsalex.net](https://heyitsalex.net/) took me no more than a few hours. ## Convert Jekyll plugins to Hugo shortcodes -Jekyll has [plugins](http://jekyllrb.com/docs/plugins/); Hugo has [shortcodes](/doc/shortcodes/). It's fairly trivial to do a port. +Jekyll has [plugins](https://jekyllrb.com/docs/plugins/); Hugo has [shortcodes](/doc/shortcodes/). It's fairly trivial to do a port. ### Implementation As an example, I was using a custom [`image_tag`](https://github.com/alexandre-normand/alexandre-normand/blob/74bb12036a71334fdb7dba84e073382fc06908ec/_plugins/image_tag.rb) plugin to generate figures with caption when running Jekyll. As I read about shortcodes, I found Hugo had a nice built-in shortcode that does exactly the same thing. @@ -150,4 +150,4 @@ Depending on the amount of customization that was done with each post with Jekyl You'll want to remove the Jekyll configuration at this point. If you have anything else that isn't used, delete it. ## A practical example in a diff -[Hey, it's Alex](http://heyitsalex.net/) was migrated in less than a _father-with-kids day_ from Jekyll to Hugo. You can see all the changes (and screw-ups) by looking at this [diff](https://github.com/alexandre-normand/alexandre-normand/compare/869d69435bd2665c3fbf5b5c78d4c22759d7613a...b7f6605b1265e83b4b81495423294208cc74d610). +[Hey, it's Alex](https://heyitsalex.net/) was migrated in less than a _father-with-kids day_ from Jekyll to Hugo. You can see all the changes (and screw-ups) by looking at this [diff](https://github.com/alexandre-normand/alexandre-normand/compare/869d69435bd2665c3fbf5b5c78d4c22759d7613a...b7f6605b1265e83b4b81495423294208cc74d610). diff --git a/exampleSite/config.toml b/exampleSite/hugo.toml similarity index 97% rename from exampleSite/config.toml rename to exampleSite/hugo.toml index 00703c8ba..35bb0829c 100644 --- a/exampleSite/config.toml +++ b/exampleSite/hugo.toml @@ -9,19 +9,21 @@ defaultContentLanguage = "en" # number of words of summarized post content (default 70) summaryLength = 70 -# Define the number of posts per page -paginate = 10 - # not pluralize title pages by default pluralizelisttitles = false [services] -[services.disqus] -# Enable comments by entering your Disqus shortname -Shortname = "devcows" -[services.googleAnalytics] -# Enable Google Analytics by entering your tracking code -id = "" + # Enable comments by entering your Disqus shortname + [services.disqus] + shortname = "devcows" + # Enable Google Analytics by entering your tracking code + [services.googleAnalytics] + id = "" + +# Define the number of posts per page +[pagination] + pagerSize = 10 + [menu] @@ -374,14 +376,14 @@ id = "" [[menu.topbar]] weight = 3 name = "Facebook" - url = "http://facebook.com" + url = "https://facebook.com" pre = "" [[menu.topbar]] weight = 4 - name = "Twitter" - url = "http://twitter.com" - pre = "" + name = "X" + url = "https://x.com" + pre = "" [[menu.topbar]] weight = 5 diff --git a/static/css/style.blue.css b/static/css/style.blue.css index 7c1660302..ef2764b67 100644 --- a/static/css/style.blue.css +++ b/static/css/style.blue.css @@ -2668,7 +2668,7 @@ fieldset[disabled] .btn-template-primary.active { display: none; } } -/* Original Boostrap template overwrite */ +/* Original Bootstrap template overwrite */ /* breadcrumbs */ .breadcrumb { font-family: "Roboto", Helvetica, Arial, sans-serif; diff --git a/static/css/style.default.css b/static/css/style.default.css index ba0eaa59d..c02c164d3 100644 --- a/static/css/style.default.css +++ b/static/css/style.default.css @@ -2668,7 +2668,7 @@ fieldset[disabled] .btn-template-primary.active { display: none; } } -/* Original Boostrap template overwrite */ +/* Original Bootstrap template overwrite */ /* breadcrumbs */ .breadcrumb { font-family: "Roboto", Helvetica, Arial, sans-serif; diff --git a/static/css/style.green.css b/static/css/style.green.css index 92de476a4..bc44bcc0b 100644 --- a/static/css/style.green.css +++ b/static/css/style.green.css @@ -2668,7 +2668,7 @@ fieldset[disabled] .btn-template-primary.active { display: none; } } -/* Original Boostrap template overwrite */ +/* Original Bootstrap template overwrite */ /* breadcrumbs */ .breadcrumb { font-family: "Roboto", Helvetica, Arial, sans-serif; diff --git a/static/css/style.marsala.css b/static/css/style.marsala.css index c50437f4a..0cc2967d7 100644 --- a/static/css/style.marsala.css +++ b/static/css/style.marsala.css @@ -2668,7 +2668,7 @@ fieldset[disabled] .btn-template-primary.active { display: none; } } -/* Original Boostrap template overwrite */ +/* Original Bootstrap template overwrite */ /* breadcrumbs */ .breadcrumb { font-family: "Roboto", Helvetica, Arial, sans-serif; diff --git a/static/css/style.pink.css b/static/css/style.pink.css index 3cafcc314..9ad54e3ae 100644 --- a/static/css/style.pink.css +++ b/static/css/style.pink.css @@ -2668,7 +2668,7 @@ fieldset[disabled] .btn-template-primary.active { display: none; } } -/* Original Boostrap template overwrite */ +/* Original Bootstrap template overwrite */ /* breadcrumbs */ .breadcrumb { font-family: "Roboto", Helvetica, Arial, sans-serif; diff --git a/static/css/style.red.css b/static/css/style.red.css index 54e66ddfb..fefd9c793 100644 --- a/static/css/style.red.css +++ b/static/css/style.red.css @@ -2668,7 +2668,7 @@ fieldset[disabled] .btn-template-primary.active { display: none; } } -/* Original Boostrap template overwrite */ +/* Original Bootstrap template overwrite */ /* breadcrumbs */ .breadcrumb { font-family: "Roboto", Helvetica, Arial, sans-serif; diff --git a/static/css/style.turquoise.css b/static/css/style.turquoise.css index 4ad677c4e..8dcde7b6d 100644 --- a/static/css/style.turquoise.css +++ b/static/css/style.turquoise.css @@ -2668,7 +2668,7 @@ fieldset[disabled] .btn-template-primary.active { display: none; } } -/* Original Boostrap template overwrite */ +/* Original Bootstrap template overwrite */ /* breadcrumbs */ .breadcrumb { font-family: "Roboto", Helvetica, Arial, sans-serif; diff --git a/static/css/style.violet.css b/static/css/style.violet.css index ba3dac16a..76953191a 100644 --- a/static/css/style.violet.css +++ b/static/css/style.violet.css @@ -2668,7 +2668,7 @@ fieldset[disabled] .btn-template-primary.active { display: none; } } -/* Original Boostrap template overwrite */ +/* Original Bootstrap template overwrite */ /* breadcrumbs */ .breadcrumb { font-family: "Roboto", Helvetica, Arial, sans-serif; diff --git a/static/js/hpneo.gmaps.js b/static/js/hpneo.gmaps.js index 66b4959de..172e9b3fb 100644 --- a/static/js/hpneo.gmaps.js +++ b/static/js/hpneo.gmaps.js @@ -19,7 +19,7 @@ */ if (!(typeof window.google === 'object' && window.google.maps)) { - throw 'Google Maps API is required. Please register the following JavaScript library http://maps.google.com/maps/api/js?sensor=true.' + throw 'Google Maps API is required. Please register the following JavaScript library https://maps.google.com/maps/api/js?sensor=true.' } var extend_object = function(obj, new_obj) {