The value returned by {{ page.url }} reflects what is specified for the page.
In order to get the URLs, so as not to include the βindex.htmlβ part, you will need to add the front link constant parameter for each of these pages. This virtually eliminates the need for all files named "index.html" in separate folders.
So your front question will contain something like:
--- permalink: /scratchpad/level/relative/ ---
Note the trailing slash, if you omit this, Jekyll will create a file called "relative" instead of the directory containing the index.html file.
David hutchison
source share