Section paginated page as '/2' rather than '2/index.html'

Hello there,

I have blog project. (yep I do!)
Every post belong to a section (a country) within the content/post directory.

So each section is paginated:


page 1 is compiled normally as

but all subsequent pages are compiled as (2 here is a file named after the page number without extension containing the html of the page)

Here’s the content structure

└── post
    ├── canada
    │   ├──
    │   └──
    ├── japan
    │   ├──
    │   └──
    └── usa

I tried with another team than mine, but the problem persisted, hence my posting it here.

Anybody see something I am missing or a known bug I was not able to spot on GitHub?
Here’s the repo if need be.

As always, thanks a ton!

You can start by setting a proper baseURL in your config. Not sure if that is it, but “/” is not supported and the behaviour is undefined.

Not sure if that is it, but “/” is not supported and the behaviour is undefined.

Will remember that. Smarty pants here thought he could get away with one config file for all environments.

In any case this does not fix the problem :frowning:

Works for me (on macOS).

It looks unstyled and ugly, though. A related tip: Use relURL (or absURL) to construct urls to static resources (CSS etc.). Then you don’t have to worry about … slashes.

It works on live server, but not on build (neither on my macOS or netlify)

Be nice! (npm install, and grunt on your local)

Thanks for the relURL tip!

I guess it is the url in the section front matter – which I guess is something new (since a few versions back). I assume it is the missing trailing slash in the URL.

I tried adding a trailing slash to it but to no avail.

I removed it and it works fine.
I can live with as my section url…

You can create an issue on GH. It should work, but it is not at the top of my list of things to fix.

1 Like

Done, feel free to revise wording of title for something which makes more sense to you.