Closed
Description
Hugo v0.55 has breaking changes that break some features and also warns of future deprecation of several variables. See https://github.com/gohugoio/hugo/releases/tag/v0.55.0
Therefore, refactor the code and require Hugo v0.55+ going forward.
- Refactor code based on Hugo v0.55 log messages:
WARN Page's .Hugo is deprecated and will be removed in a future release. Use the global hugo function.
WARN Page's .RSSLink is deprecated and will be removed in a future release. Use the Output Format's link, e.g. something like:
{{ with .OutputFormats.Get "RSS" }}{{ . RelPermalink }}{{ end }}.
WARN Page's .Dir is deprecated and will be removed in a future release. Use .File.Dir.
WARN Page's .UniqueID is deprecated and will be removed in a future release. Use .File.UniqueID.
WARN Page's .URL is deprecated and will be removed in a future release. Use .Permalink or .RelPermalink. If what you want is the front matter URL value, use .Params.url.
Also, due to the breaking changes in Hugo v0.55, the following may need refactoring to work with Hugo v0.55+:
- Links to local page resources are now broken (such as for local "PDF" and "bib")
- Caused by bug in Hugo v0.55.0. Fixed in Hugo v0.55.2: 0.55: resource in bundle is found but link is invalid gohugoio/hugo#5858
Shortcodes no longer work properly > Behaviour has changed for Shortcodes using the{{%
construct- "If you want the old behavior, you can put the following line in the start of your shortcode template:
{{ $_hugo_config :=
{ "version": 1 }}}
"
links to authors without profiles no longer works?preserveTaxonomyNamesconfiguration option is removed. Use .Page.Title.
We no longer add XML headers to Output Formats that output XML (<?xml version="1.0" encoding="utf-8" standalone="yes" ?>). This header is moved to the templates. If you have custom RSS or sitemap templates you may want to add the XML declaration to these. Since they, by default, is handled by Go's HTML template package, you must do something like this to make sure it's preserved: {{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>" | safeHTML }}
- upgrade
rss.xml
, removesitemap.xml
to revert to Hugo's latest internal tpl
The taxonomy nodes now have a .Page accessor which makes it much simpler to get a proper .Title etc.
- upgrade
tag_cloud.html
Metadata
Metadata
Assignees
Type
Projects
Relationships
Development
No branches or pull requests
Activity
[-]Refactor for Hugo v0.55+[/-][+]Add Support for Hugo v0.55+[/+]brainstorm commentedon Apr 12, 2019
Awesome work @gcushen, super appreciated, this issue saved me quite a few of headaches today wondering why a fresh new site from scratch was not working after installing the theme via blogdown:
Is there a way to know which Hugo version is actually supported on
master
? I'm getting this message when runninghugo@0.49.2
(after reading the very helpful breaking changes page):But then when I downgrade to 0.53 via:
I'm getting this instead:
Thanks again in advance!
/cc @ohofmann @MrsLaviniaG
gcushen commentedon Apr 14, 2019
@brainstorm the official installation guide for installing Academic with RStudio can be found here: https://sourcethemes.com/academic/docs/install/#install-with-rstudio
brainstorm commentedon Apr 14, 2019
Yes, @gcushen, I did follow that guide closely, I'll give it a second/third look and get back to you.
brainstorm commentedon Apr 15, 2019
The official installation guide assumes installation from scratch... in this case, the missing directory
config
made all the difference, only noticed it when starting from scratch all over again :-SThanks!
v3.3 -> v4.1 | WiP