I’ve been playing about with aliases this evening, and noticed that Hugo is building
/page/1/index.html for some unknown reason. This is the code base:
If you run
hugo --debug --verbose you can spot the following:
DEBUG 2017/08/15 22:11:42 Render paginator for page ""
DEBUG 2017/08/15 22:11:42 creating alias: /page/1/index.html redirecting to /
INFO 2017/08/15 22:11:42 Alias "/page/1/index.html" translated to "page/1/index.html"
But I have no idea why this would be happening? Even with
disableAliases = true it creates this extra alias file
When you pagination posts, the next page is
example/page/3/, and so on. So what is
example/page/1/? The original list page, which in this case would be
This feature probably doesn’t respect the
disableAliasesoption because it is a good practice even when aliases aren’t used for individual pages.
Your title says, “unwanted”. Is that causing a conflict somewhere else on your site?
Ah! Yes. I totally didn’t think about pagination. I checked a few other Hugo sites I found on github and couldn’t replicate, so figured it may have been something I had done incorrectly.
It was unwanted, but only from a perfectionists perspective. Actually, since this is pagination, that’s cool.
Thanks for this! Much appreciated.