Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix errors thrown with latest hugo version #426

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |

Expand Down Expand Up @@ -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`.
Expand Down
1 change: 1 addition & 0 deletions exampleSite/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
themes/
.hugo_build.lock
Empty file removed exampleSite/.hugo_build.lock
Empty file.
4 changes: 2 additions & 2 deletions exampleSite/content/blog/go-is-for-lovers.md
Original file line number Diff line number Diff line change
Expand Up @@ -331,5 +331,5 @@ so, such as in this example:
```


[go]: <http://golang.org/>
[gohtmltemplate]: <http://golang.org/pkg/html/template/>
[go]: <https://go.dev/>
[gohtmltemplate]: <https://pkg.go.dev/html/template>
6 changes: 3 additions & 3 deletions exampleSite/content/blog/migrate-from-jekyll.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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).
28 changes: 15 additions & 13 deletions exampleSite/config.toml → exampleSite/hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down Expand Up @@ -374,14 +376,14 @@ id = ""
[[menu.topbar]]
weight = 3
name = "Facebook"
url = "http://facebook.com"
url = "https://facebook.com"
pre = "<i class='fab fa-2x fa-facebook'></i>"

[[menu.topbar]]
weight = 4
name = "Twitter"
url = "http://twitter.com"
pre = "<i class='fab fa-2x fa-twitter'></i>"
name = "X"
url = "https://x.com"
pre = "<i class='fab fa-2x fa-x-twitter'></i>"

[[menu.topbar]]
weight = 5
Expand Down
2 changes: 1 addition & 1 deletion static/css/style.blue.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion static/css/style.default.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion static/css/style.green.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion static/css/style.marsala.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion static/css/style.pink.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion static/css/style.red.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion static/css/style.turquoise.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion static/css/style.violet.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion static/js/hpneo.gmaps.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down