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
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?
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
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
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.