~gsthnz/public-inbox

1

Posts list with index.gmi output

Michael Bryant <shadow53@shadow53.com>
Details
Message ID
<xyJWadnxK5mgpk_Hz0wCT8zdJ3i0L6J-DmgNDpt0hKsfDoGxA__fnOM_l5vkMy3aOW_RHpEa-rRkvnfc3o_mQQwG1CHEJVHTf8rOHpRWElc=@shadow53.com>
DKIM signature
pass
Download raw message
I like having "prettified" URLs, e.g. `example.com/foo/` instead of `example.com/foo.gmi`.
To try to achieve that, all of my content is in `page-slug/index.gmi`, but this does not
seem to play well with the templates -- no posts list is generated.

It's possible that the problem is just that I have a `/posts/index.gmi` that is taking
precedence, but, reading the README, I think that may not be it, since non-`index.gmi`
files are considered content.

So: if I use `page-slug.gmi` for file names instead, will it generate the "pretty"
`index.gmi` files? If not, is there an option to make it do so? If not that, would you
be willing to add it as a feature or at least accept a patch for it?

Regards,

Shadow53
Details
Message ID
<CAAWPYM9FGPA.FH72SRAU7C7C@odin>
In-Reply-To
<xyJWadnxK5mgpk_Hz0wCT8zdJ3i0L6J-DmgNDpt0hKsfDoGxA__fnOM_l5vkMy3aOW_RHpEa-rRkvnfc3o_mQQwG1CHEJVHTf8rOHpRWElc=@shadow53.com> (view parent)
DKIM signature
pass
Download raw message
Hi Michael,

Sorry for the delay,

On Sun Mar 28, 2021 at 3:29 AM -03, Michael Bryant wrote:
> I like having "prettified" URLs, e.g. `example.com/foo/` instead of
> `example.com/foo.gmi`.
> To try to achieve that, all of my content is in `page-slug/index.gmi`,
> but this does not
> seem to play well with the templates -- no posts list is generated.

> It's possible that the problem is just that I have a `/posts/index.gmi`
> that is taking
> precedence, but, reading the README, I think that may not be it, since
> non-`index.gmi`
> files are considered content.

That's a use-case which I did not took into account. It won't work
properly. Simply because I ignore index pages entirely when getting
children (content) pages.

> If not that, would you be willing to add it as a feature or at least
> accept a patch for it?

We could perhaps create a config option to make fetchChildren take this
format you use into consideration. I guess it would be really complex to
make both formats work together, so I think it's best to make it into a
config option and everyone can choose how to use it.

I have very little time lately to work on this, I you want to work on
this, I would greatly appreciate a patch :)

Thank you!

--
Gustavo Heinz
Reply to thread Export thread (mbox)