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

Update from hugo 0.57.2 to 0.120.3 #141

Merged
merged 4 commits into from
Nov 10, 2023
Merged

Conversation

f18m
Copy link
Contributor

@f18m f18m commented Nov 3, 2023

  • Hugo upgrade: Convert deprecated .URL to .RelPermalink
  • Hugo upgrade: Workaround an error reported on style.sass about "malformed URL"
  • Update dockerfile to use the new hugo version

* Hugo upgrade: Convert deprecated .URL to .RelPermalink
* Hugo upgrade: Workaround an error reported on style.sass about "malformed URL"
* Update dockerfile to use the new hugo version
@f18m
Copy link
Contributor Author

f18m commented Nov 3, 2023

About the docker change: long story short: apparently there were several changes in the last few years on the maintainer of the "official" docker image for hugo. According to https://discourse.gohugo.io/t/the-up-to-date-hugo-docker-images/43293 the most updated docker image is now https://hugomods.com/en/docs/docker/.
This is what this PR is proposing to use as docker

@@ -1,9 +1,3 @@
{{- $fonts := site.Params.fonts }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is just the "poor man" attempt to fix an issue in some language I don't know.

Here's the error I'm getting with using a newer hugo on this file (keeping the loop on Params.fonts in place):

[root@fedora zeromq.org-f18m]# make serve
hugo server \
--buildDrafts \
--buildFuture \
--disableFastRender \
--ignoreCache
Start building sites … 
hugo v0.101.0+extended linux/amd64 BuildDate=unknown
Error: Error building site: TOCSS: failed to transform "sass/style.sass" (text/x-sass): "/storage/work/git/zeromq.org-f18m/assets/sass/style.sass:5:9": malformed URL

Maybe @somdoron or @sappo you are able to do a better fix

@f18m
Copy link
Contributor Author

f18m commented Nov 3, 2023

@sappo , @somdoron ,
I think all Netlify github hooks are reporting "deploy failed" because the Netlify ZeroMQ website needs to upgrade from Ubuntu 16.04 Xenial Xerus to Ubuntu 20.04 (Focal)
See:
https://answers.netlify.com/t/please-read-end-of-support-for-xenial-build-image-everything-you-need-to-know/68239

I guess you have credentials to make such change...

@f18m
Copy link
Contributor Author

f18m commented Nov 3, 2023

cc @bluca

@bluca
Copy link
Member

bluca commented Nov 3, 2023

I don't have access to that

@f18m
Copy link
Contributor Author

f18m commented Nov 3, 2023

A final note I forgot to add: I tested locally the hugo upgrade (preliminary I think to any other activity and PR for zeroMQ website) and I checked side by side the rendering with the current website and found no difference at all.
But again I'm not sure why e.g. in the config.toml multiple font sizes (e.g. for "Open Sans" font) where mentioned...

@f18m
Copy link
Contributor Author

f18m commented Nov 3, 2023

A final note I forgot to add: I tested locally the hugo upgrade (preliminary I think to any other activity and PR for zeroMQ website) and I checked side by side the rendering with the current website and found no difference at all. But again I'm not sure why e.g. in the config.toml multiple font sizes (e.g. for "Open Sans" font) where mentioned...

I forgot also to say that actually the website rendered with the new hugo is showing a small difference with the one online: at this page https://zeromq.org/languages/c/ you will see that there is some URLs that do not get properly rendered:

image

while with the new hugo they get rendered:

image

@f18m
Copy link
Contributor Author

f18m commented Nov 6, 2023

Ping @sappo , @somdoron for the review of this MR (and for the update of the Netlify settings), thanks!

…to Markdown syntax to enable auto linking; finally regen updated content using 'hugo' command
@f18m
Copy link
Contributor Author

f18m commented Nov 7, 2023

A final note I forgot to add: I tested locally the hugo upgrade (preliminary I think to any other activity and PR for zeroMQ website) and I checked side by side the rendering with the current website and found no difference at all. But again I'm not sure why e.g. in the config.toml multiple font sizes (e.g. for "Open Sans" font) where mentioned...

I forgot also to say that actually the website rendered with the new hugo is showing a small difference with the one online: at this page https://zeromq.org/languages/c/ you will see that there is some URLs that do not get properly rendered:

image

while with the new hugo they get rendered:

image

Actually I realized that there was a problem with embedded HTML into Markdown documents using latest Hugo.
I fixed the problem in 2 ways:

  1. I have enabled "unsafe" property in Goldmark Hugo renderer ... that's the only way to enable embedded HTML in markdown
  2. I have converted HTML tables into Markdown tables; this makes auto-linking work out-of-the-box. This improves very much the tables shown for all languages in the website

@f18m
Copy link
Contributor Author

f18m commented Nov 10, 2023

Update: thanks to @sappo I have now joined the Netlify account and I could update the docker image from Ubuntu 16.04 Xenial Xerus to Ubuntu 20.04 (Focal). Now indeed this PR is green and the website preview, with the proposed changes is available at:

https://deploy-preview-141--zen-shockley-672cf8.netlify.app/get-started/

Note that I upgraded Ubuntu version for all projects on Netlify:

  • zeromq.org
  • rfc.zeromq.org
  • zguide.zeromq.org

@bluca bluca merged commit af9af60 into zeromq:master Nov 10, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants