Upgrade from 0.24.1 to 0.32.1

I a contributor to the pony language and I need to update their webiste. The source for the website is here. I hoping I’m asking a relative easy question that can be answered with a short explanation or link.

As the title says the current website is generated with hugo version 0.24.1 and I’d like to get an idea what it would take to upgrade hugo to 0.32.1 or even 0.32.2. Right now when I run “hugo server -D” I get the following errors and when I go to localhost:1313 none of the links to local pages work:

$ hugo server -D
Building sites … ERROR 2018/01/03 16:50:14 error processing shortcode "_internal/shortcodes/relref.html" for page "index.md": template: _internal/shortcodes/relref.html:1:76: executing "_internal/shortcodes/relref.html" at <relref .Page (.Get 0...>: error calling relref: No page found with path or logical name "reference/index.md".
ERROR 2018/01/03 16:50:14 error processing shortcode "_internal/shortcodes/relref.html" for page "index.md": template: _internal/shortcodes/relref.html:1:76: executing "_internal/shortcodes/relref.html" at <relref .Page (.Get 0...>: error calling relref: No page found with path or logical name "reference/index.md".
ERROR 2018/01/03 16:50:14 error processing shortcode "_internal/shortcodes/relref.html" for page "index.md": template: _internal/shortcodes/relref.html:1:76: executing "_internal/shortcodes/relref.html" at <relref .Page (.Get 0...>: error calling relref: No page found with path or logical name "contribute/index.md".
ERROR 2018/01/03 16:50:14 error processing shortcode "_internal/shortcodes/relref.html" for page "index.md": template: _internal/shortcodes/relref.html:1:76: executing "_internal/shortcodes/relref.html" at <relref .Page (.Get 0...>: error calling relref: No page found with path or logical name "faq/index.md".
ERROR 2018/01/03 16:50:14 error processing shortcode "_internal/shortcodes/ref.html" for page "blog/state-of-the-stable-2016.md": template: _internal/shortcodes/ref.html:1:73: executing "_internal/shortcodes/ref.html" at <ref .Page (.Get 0)>: error calling ref: No page found with path or logical name "contribute/index.md".
ERROR 2018/01/03 16:50:14 error processing shortcode "_internal/shortcodes/relref.html" for page "community/index.md": template: _internal/shortcodes/relref.html:1:76: executing "_internal/shortcodes/relref.html" at <relref .Page (.Get 0...>: error calling relref: No page found with path or logical name "faq/index.md".
ERROR 2018/01/03 16:50:14 error processing shortcode "_internal/shortcodes/relref.html" for page "community/index.md": template: _internal/shortcodes/relref.html:1:76: executing "_internal/shortcodes/relref.html" at <relref .Page (.Get 0...>: error calling relref: No page found with path or logical name "planet-pony.md".
ERROR 2018/01/03 16:50:14 error processing shortcode "_internal/shortcodes/relref.html" for page "community/index.md": template: _internal/shortcodes/relref.html:1:76: executing "_internal/shortcodes/relref.html" at <relref .Page (.Get 0...>: error calling relref: No page found with path or logical name "state-of-the-stable-2016.md".
ERROR 2018/01/03 16:50:14 error processing shortcode "_internal/shortcodes/relref.html" for page "community/index.md": template: _internal/shortcodes/relref.html:1:76: executing "_internal/shortcodes/relref.html" at <relref .Page (.Get 0...>: error calling relref: No page found with path or logical name "contribute/index.md".
ERROR 2018/01/03 16:50:14 error processing shortcode "_internal/shortcodes/relref.html" for page "community/index.md": template: _internal/shortcodes/relref.html:1:76: executing "_internal/shortcodes/relref.html" at <relref .Page (.Get 0...>: error calling relref: No page found with path or logical name "code-of-conduct.md".
ERROR 2018/01/03 16:50:14 error processing shortcode "_internal/shortcodes/relref.html" for page "faq/index.md": template: _internal/shortcodes/relref.html:1:76: executing "_internal/shortcodes/relref.html" at <relref .Page (.Get 0...>: error calling relref: No page found with path or logical name "discover/index.md".
ERROR 2018/01/03 16:50:14 error processing shortcode "_internal/shortcodes/relref.html" for page "faq/index.md": template: _internal/shortcodes/relref.html:1:76: executing "_internal/shortcodes/relref.html" at <relref .Page (.Get 0...>: error calling relref: No page found with path or logical name "discover/index.md".
ERROR 2018/01/03 16:50:14 error processing shortcode "_internal/shortcodes/relref.html" for page "faq/index.md": template: _internal/shortcodes/relref.html:1:76: executing "_internal/shortcodes/relref.html" at <relref .Page (.Get 0...>: error calling relref: No page found with path or logical name "discover/index.md".
ERROR 2018/01/03 16:50:14 error processing shortcode "_internal/shortcodes/relref.html" for page "faq/index.md": template: _internal/shortcodes/relref.html:1:76: executing "_internal/shortcodes/relref.html" at <relref .Page (.Get 0...>: error calling relref: No page found with path or logical name "discover/index.md".
ERROR 2018/01/03 16:50:14 error processing shortcode "_internal/shortcodes/relref.html" for page "learn/index.md": template: _internal/shortcodes/relref.html:1:76: executing "_internal/shortcodes/relref.html" at <relref .Page (.Get 0...>: error calling relref: No page found with path or logical name "faq/index.md".
ERROR 2018/01/03 16:50:14 error processing shortcode "_internal/shortcodes/relref.html" for page "reference/index.md": template: _internal/shortcodes/relref.html:1:76: executing "_internal/shortcodes/relref.html" at <relref .Page (.Get 0...>: error calling relref: No page found with path or logical name "pony-lldb-cheatsheet.md".
ERROR 2018/01/03 16:50:14 error processing shortcode "_internal/shortcodes/relref.html" for page "reference/index.md": template: _internal/shortcodes/relref.html:1:76: executing "_internal/shortcodes/relref.html" at <relref .Page (.Get 0...>: error calling relref: No page found with path or logical name "pony-performance-cheatsheet.md".

                   | EN  
+------------------+----+
  Pages            | 92  
  Paginator pages  |  0  
  Non-page files   |  0  
  Static files     | 36  
  Processed images |  0  
  Aliases          |  0  
  Sitemaps         |  1  
  Cleaned          |  0  

Total in 68 ms
Watching for changes in /home/wink/prgs/pony/ponylang.github.io/{content,data,layouts,static}
Serving pages from memory
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
Press Ctrl+C to stop

Any suggestions are much appreciated.

– Wink

You’re getting a lot of this sort of error:

Where are those files? What’s their path in the project?

Here are all files, the “missing” files are in directories underneath content/
such as content/faq/index.md

wink@wink-desktop:~/prgs/pony/ponylang.github.io (master)
$ tree .
.
├── archetypes
│   ├── default.md
│   ├── lwip.md
│   └── release.md
├── CODE_OF_CONDUCT.md
├── config.toml
├── content
│   ├── blog
│   │   ├── 0.12.0-released.md
│   │   ├── 0.12.1-released.md
│   │   ├── 0.12.2-released.md
│   │   ├── 0.12.3-released.md
│   │   ├── 0.13.0-released.md
│   │   ├── 0.13.1-released.md
│   │   ├── 0.13.2-released.md
│   │   ├── 0.14.0-released.md
│   │   ├── 0.15.0-released.md
│   │   ├── 0.16.0-released.md
│   │   ├── 0.16.1-released.md
│   │   ├── 0.17.0-released.md
│   │   ├── 0.18.0-released.md
│   │   ├── 0.18.1-released.md
│   │   ├── 0.19.0-released.md
│   │   ├── 0.19.1-released.md
│   │   ├── 0.19.2-released.md
│   │   ├── 0.19.3-released.md
│   │   ├── 0.20.0-released.md
│   │   ├── 0.21.0-released.md
│   │   ├── 0.21.1-released.md
│   │   ├── 0.21.2-released.md
│   │   ├── early-history-of-pony.md
│   │   ├── _index.md
│   │   ├── last-week-in-pony-032817.md
│   │   ├── last-week-in-pony-040417.md
│   │   ├── last-week-in-pony-041117.md
│   │   ├── last-week-in-pony-041717.md
│   │   ├── last-week-in-pony-042417.md
│   │   ├── last-week-in-pony-043017.md
│   │   ├── last-week-in-pony-050717.md
│   │   ├── last-week-in-pony-051417.md
│   │   ├── last-week-in-pony-052117.md
│   │   ├── last-week-in-pony-052817.md
│   │   ├── last-week-in-pony-060417.md
│   │   ├── last-week-in-pony-061117.md
│   │   ├── last-week-in-pony-061817.md
│   │   ├── last-week-in-pony-062517.md
│   │   ├── last-week-in-pony-070217.md
│   │   ├── last-week-in-pony-070917.md
│   │   ├── last-week-in-pony-071617.md
│   │   ├── last-week-in-pony-072317.md
│   │   ├── last-week-in-pony-073017.md
│   │   ├── last-week-in-pony-080617.md
│   │   ├── last-week-in-pony-081317.md
│   │   ├── last-week-in-pony-082017.md
│   │   ├── last-week-in-pony-082717.md
│   │   ├── last-week-in-pony-090317.md
│   │   ├── last-week-in-pony-091017.md
│   │   ├── last-week-in-pony-091717.md
│   │   ├── last-week-in-pony-092417.md
│   │   ├── last-week-in-pony-100317.md
│   │   ├── last-week-in-pony-100817.md
│   │   ├── last-week-in-pony-10152017.md
│   │   ├── last-week-in-pony-10222017.md
│   │   ├── last-week-in-pony-10292017.md
│   │   ├── last-week-in-pony-11052017.md
│   │   ├── last-week-in-pony-11122017.md
│   │   ├── last-week-in-pony-11192017.md
│   │   ├── last-week-in-pony-11262017.md
│   │   ├── last-week-in-pony-12032017.md
│   │   ├── last-week-in-pony-12102017.md
│   │   ├── last-week-in-pony-12172017.md
│   │   ├── last-week-in-pony-12242017.md
│   │   ├── last-week-in-pony-12312017.md
│   │   ├── myfirstpony-co.md
│   │   ├── myfirstpony-kh.md
│   │   ├── pony-stable-0.1.0-released.md
│   │   ├── pony-stable-0.1.1-released.md
│   │   └── state-of-the-stable-2016.md
│   ├── community
│   │   ├── code-of-conduct.md
│   │   ├── index.md
│   │   ├── planet-pony.md
│   │   └── talks.md
│   ├── contribute
│   │   ├── index.md
│   │   ├── project-documentation.md
│   │   └── triage.md
│   ├── discover
│   │   └── index.md
│   ├── faq
│   │   └── index.md
│   ├── index.md
│   ├── learn
│   │   └── index.md
│   ├── reference
│   │   ├── index.md
│   │   ├── pony-lldb-cheatsheet.md
│   │   └── pony-performance-cheatsheet.md
│   └── sponsors
│       └── index.md
├── CONTRIBUTING.md
├── data
│   ├── author
│   │   ├── codecabc.json
│   │   ├── colinobrien.json
│   │   ├── kevinhoffman.json
│   │   ├── mwahl.json
│   │   ├── seantallen.json
│   │   ├── sylvan.json
│   │   └── theobutler.json
│   └── recent-talks.json
├── HOW_TO.md
├── layouts
│   ├── 404.html
│   ├── blog
│   │   └── single.html
│   ├── _default
│   │   ├── single.html
│   │   ├── taxonomy.html
│   │   └── terms.html
│   ├── index.html
│   ├── partials
│   │   ├── article-footer.html
│   │   ├── author.html
│   │   ├── drawer.html
│   │   ├── footer_js.html
│   │   ├── header.html
│   │   ├── head.html
│   │   ├── list-in-blog.html
│   │   ├── nav.html
│   │   ├── nav_link.html
│   │   ├── page-footer.html
│   │   └── share.html
│   ├── section
│   │   └── blog.html
│   ├── shortcodes
│   │   ├── note.html
│   │   └── warning.html
│   └── talks
│       └── single.html
├── LICENSE.md
├── public
│   ├── 404.html
│   ├── avatars
│   │   ├── codecabc.png
│   │   ├── colinobrien.png
│   │   ├── default.png
│   │   ├── kevinhoffman.png
│   │   ├── mwahl.png
│   │   ├── seantallen.png
│   │   ├── sylvan.png
│   │   └── theobutler.png
│   ├── benchmarks_all.pdf
│   ├── categories
│   │   ├── index.html
│   │   └── index.xml
│   ├── CNAME
│   ├── fonts
│   │   ├── icon.eot
│   │   ├── icon.svg
│   │   ├── icon.ttf
│   │   └── icon.woff
│   ├── images
│   │   ├── favicon.ico
│   │   ├── logo.png
│   │   └── main.jpg
│   ├── index.html
│   ├── index.xml
│   ├── javascripts
│   │   ├── application.js
│   │   ├── modernizr.js
│   │   └── smooth-scroll.min.js
│   ├── media
│   │   ├── img
│   │   │   ├── ipr0gram-1.jpg
│   │   │   └── ipr0gram-2.jpg
│   │   └── papers
│   │       ├── a_prinicipled_design_of_capabilities_in_pony.pdf
│   │       ├── a_string_of_ponies.pdf
│   │       ├── fast-cheap.pdf
│   │       ├── fast-cheap-with-proof.pdf
│   │       ├── formalizing-generics-for-pony.pdf
│   │       ├── OGC.pdf
│   │       ├── opsla237-clebsch.pdf
│   │       └── orca_gc_and_type_system_co-design_for_actor_languages.pdf
│   ├── README.md
│   ├── sitemap.xml
│   ├── stylesheets
│   │   ├── application.css
│   │   ├── highlight
│   │   │   └── highlight.css
│   │   ├── palettes.css
│   │   ├── pony-material.css
│   │   └── temporary.css
│   └── tags
│       ├── index.html
│       └── index.xml
├── README.md
└── static
    ├── avatars
    │   ├── codecabc.png
    │   ├── colinobrien.png
    │   ├── default.png
    │   ├── kevinhoffman.png
    │   ├── mwahl.png
    │   ├── seantallen.png
    │   ├── sylvan.png
    │   └── theobutler.png
    ├── benchmarks_all.pdf
    ├── CNAME
    ├── fonts
    │   ├── icon.eot
    │   ├── icon.svg
    │   ├── icon.ttf
    │   └── icon.woff
    ├── images
    │   ├── favicon.ico
    │   ├── logo.png
    │   └── main.jpg
    ├── javascripts
    │   ├── application.js
    │   ├── modernizr.js
    │   └── smooth-scroll.min.js
    ├── media
    │   ├── img
    │   │   ├── ipr0gram-1.jpg
    │   │   └── ipr0gram-2.jpg
    │   └── papers
    │       ├── a_prinicipled_design_of_capabilities_in_pony.pdf
    │       ├── a_string_of_ponies.pdf
    │       ├── fast-cheap.pdf
    │       ├── fast-cheap-with-proof.pdf
    │       ├── formalizing-generics-for-pony.pdf
    │       ├── OGC.pdf
    │       ├── opsla237-clebsch.pdf
    │       └── orca_gc_and_type_system_co-design_for_actor_languages.pdf
    ├── README.md
    └── stylesheets
        ├── application.css
        ├── highlight
        │   └── highlight.css
        ├── palettes.css
        ├── pony-material.css
        └── temporary.css

41 directories, 203 files

And the contents of config.tomal:

wink@wink-desktop:~/prgs/pony/ponylang.github.io (master)
$ cat config.toml 
baseurl = "https://www.ponylang.org"
languageCode = "en-us"
title = "Pony"
metadataformat = "TOML"
canonifyurls = false
# Enable Google Analytics by entering your tracking id

[params]
	# General information
	description = "Pony - High Performance Actor Programming"
	copyright = "Pony Developers"

	# Repository
	provider = "GitHub"
	repo_url = "https://github.com/ponylang/ponyc"

	logo = "/images/logo.png"
	favicon = ""

	permalink = "#"

	# Custom assets
	custom_css = ["stylesheets/pony-material.css"]
	custom_js  = []

	# Syntax highlighting theme
	highlight_css  = ""

	[params.palette]
    	primary = "brown"
    	accent  = "deep-orange"

    [params.font]
    	text = "Roboto"
    	code = "Roboto Mono"

[social]
	twitter = "ponylang"
	github  = "ponylang"

[[menu.main]]
	name   = "Pony"
	url    = "/"
	weight = 1

[[menu.main]]
	name   = "New to Pony?"
	url    = "/discover/"
	weight = 10

[[menu.main]]
	name   = "Learning Pony?"
	url    = "/learn/"
	weight = 20

[[menu.main]]
	name   = "Existing User?"
	url    = "/reference/"
	weight = 30

[[menu.main]]
	name   = "Looking to contribute?"
	url    = "/contribute/"
	weight = 40

[[menu.main]]
	name   = "Community"
	url    = "/community/"
	weight = 50

[[menu.main]]
	name   = "Blog"
	url    = "/blog/"
	weight = 60

[[menu.main]]
	name   = "FAQ"
	url    = "/faq/"
	weight = 70

[[menu.main]]
	name   = "Code of Conduct"
	url    = "/community/code-of-conduct/"
	weight = 80

[[menu.main]]
	name   = "Sponsors"
	url    = "/sponsors/"
	weight = 90

[blackfriday]
	smartypants	= true
	fractions = true
	smartDashes = true
	plainIDAnchors = true

[permalinks]
  blog = "/blog/:year/:month/:slug/"

[taxonomies]
  category = "categories"
  tag = "tags"

I have not tested relref nor can I see how you’re using it, but, what about passing e.g. content/reference/index.md instead of reference/index.md?

Do you use canonifyURLs = true when testing or is that for production? I have limited experience with Hugo I’m just wondering if you’ve seen this topic?

Good luck.

Thanks for the reply, but links are still not working. So I made something much simpler the entire site is now in a directory calle something/. You can see the structure and the contents of each of the files below:

wink@wink-desktop:~/prgs/hugo/something
$ tree
.
├── config.toml
├── content
│   ├── about
│   │   └── index.md
│   └── index.md
└── layouts
    └── index.html

3 directories, 4 files
wink@wink-desktop:~/prgs/hugo/something
$ cat config.toml 
baseurl = "https://something.com"
metadataformat = "TOML"
relativeURLs = true
canonifyURLs = true
wink@wink-desktop:~/prgs/hugo/something
$ cat content/index.md 
+++
type = "index"
+++
Here is a paragraph of content for Main Page

## Links

- [What is Pony?](https://www.ponylang.org/discover/#what-is-pony)
- [Local link](#local-link)
- [About xx](about)

  
  
  
  
  
  
  
  
## Local Link
Hello from down in the link
wink@wink-desktop:~/prgs/hugo/something
$ cat content/about/index.md 
+++
type = "index"
+++
This is the About Page
wink@wink-desktop:~/prgs/hugo/something
$ cat layouts/index.html 
<main class="main">
	{{ range where .Site.Pages "Type" "index" }}
		{{ .Content }}
	{{ end }}
</main>

When I run this site using 0.32.1 the About xx link fails with “404 page not found”. Although with this I’m not getting any errors when I run hugo server:

wink@wink-desktop:~/prgs/hugo/something
$ hugo server

                   | EN  
+------------------+----+
  Pages            |  5  
  Paginator pages  |  0  
  Non-page files   |  0  
  Static files     |  0  
  Processed images |  0  
  Aliases          |  0  
  Sitemaps         |  1  
  Cleaned          |  0  

Total in 16 ms
Watching for changes in /home/wink/prgs/hugo/something/{content,layouts}
Serving pages from memory
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
Press Ctrl+C to stop

So what have I done wrong?

I’m seeing the same thing on an existing site when trying it with 0.32.4. One of my pages is mysteriously not rendering at all, like it didn’t exist, and hence ref is throwing this error when referring to it…


OK, here seems to be the thing. If I have

content/
    foo/
        index.html
        bar.html

then bar.html is completely ignored and this renders to just

_site/
    foo/
        index.html

with anything referring to bar.html broken. However, if I change this to

content/
    foo.html   # previously foo/index.html
    foo/
        bar.html

then things will render properly, and references work:

_site/
    foo/
        index.html
        bar.html

Is this intentional?

Yes. Look at the release notes of Hugo 0.32. index.md is now reserved for Page Bundles.

1 Like

So @calmh 's problem does seem similar to my problem in that in the example below about/index.md is ignored and public/about/index.html is not generated. So if index.md is reserved for Page Bundles what should I do instead?

Below is my simplest website I created to show the problem.

wink@wink-desktop:~/prgs/hugo/simplest
$ tree
    .
    ├── config.toml
    ├── content
    │   ├── about
    │   │   └── index.md
    │   └── index.md
    └── layouts
        └── index.html

config.toml

wink@wink-desktop:~/prgs/hugo/simplest
$ cat config.toml
baseurl = "http://simplest.com"
metadataformat = "TOML"
relativeURLs = true
canonifyURLs = true

content/index.md

$ cat content/index.md
+++
type = "index"
+++
## Links
- [About link](about)

content/about/index.md

wink@wink-desktop:~/prgs/hugo/simplest
$ cat content/about/index.md
+++
type = "index"
+++
This is the About Page

layouts/index.html

wink@wink-desktop:~/prgs/hugo/simplest
$ cat layouts/index.html 
<main class="main">
	{{ range where .Site.Pages "Type" "index" }}
		{{ .Content }}
	{{ end }}
</main>

When I run hugo with no parameters to generate the site there is no about/index.html, as mentioned above:

wink@wink-desktop:~/prgs/hugo/simplest
$ hugo

                   | EN  
+------------------+----+
  Pages            |  5  
  Paginator pages  |  0  
  Non-page files   |  0  
  Static files     |  0  
  Processed images |  0  
  Aliases          |  0  
  Sitemaps         |  1  
  Cleaned          |  0  

Total in 17 ms
wink@wink-desktop:~/prgs/hugo/simplest
$ tree
.
├── config.toml
├── content
│   ├── about
│   │   └── index.md
│   └── index.md
├── layouts
│   └── index.html
└── public
    ├── categories
    │   └── index.xml
    ├── index.html
    ├── index.xml
    ├── sitemap.xml
    └── tags
        └── index.xml

6 directories, 9 files

And if I use hugo server and browse to 1313 and then hover over the About link we can see URL is localhost:1313/about:

image

And when I click on it I get a 404 error as you’d expect since there is no public/about/index.html:

image