Pages without date/weight in sorted section


How do folks handle cases where you need pages where date/weight is not appropriate within a sorted section? For example, take this layout, which is relatively common. I have a page with blog, including an archive page:

- blog
  - 2023
    - _
  - 2024
    - _
  - _
- _
  • 2023, 2024 are transparent sections (transparent = true)
  • blog/ includes sort_by = "date" to be able to have page.lower, page.higher
  • blog/ does not have a date in metadata set, as it makes no sense

The behaviour is such that the page gets completely ignored and not rendered. I would expect it to be ignored from the sorting set, but still rendered into a file.

The only thing I can think of is moving the archive out to the root and giving it an alias into blog/archive.html, but that is cumbersome and not ideal user experience. I could also add another level to the directories, but I would prefer not having extraneous directories just to make something simple like this work.

Can anyone propose other workarounds? How do folks deal with setup like this?

I can’t think of other workarounds.

It makes sense to me to have /blog for blogposts and /archive for the archive. /blog/archive would be for a post with the “archive” slug.

Thanks for the feedback! Makes sense, though I consider blog to be a part/subsection of a website, not the main feature, so it makes more sense to have archive under blog, as archive at top level would suggest archive of the whole site. The blog layout as outlined above is organized by years, so posts would be under /blog/<year>/<slug>, leaving /blog/archive to not impede on slug namespace.

I suppose I’ll go with /blog-archive then :slight_smile:

1 Like