You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Namely, that if your markdown file is in a _posts directory, and if its titled like YEAR-MONTH-DAY-title.MARKUP then bloggy things happen:
For jekyll, this means that,
The built html is put into a directory structure to get a nice url that looks like DOMAIN/YEAR/MONTH/DAY/title.html
the page's date is made available to the layout template, so that the published date can be automatically inserted
the site's posts are made available as an object you could interact with sites.posts i.e. to show the latest blog post on the front page jekyll lets you do something like this in an index.md.
I don't know how better it is to write 2024-04-01-april-fool.md than having files in folders such as 2024/04/01-april-fool.md. It's probably convenient for some, but is the gain worth the cost, that is, losing the univocal mapping between file and url, and making relative links even more of a headache? Conversely, if you want a flat folder, can't you live with flat urls?
The "page's date is made available to the layout template" is related to #1036. I do want to have meta data (dates, authors, tags…) available to the page and to server-side rendering (SSR, #413).
Inferring a date from a file name seems like a minor affordance; it could be an application of a hook for inferring the page's meta data from front matter & file contents (it's already the case with the title, which can come from either front matter or from the first H1).
For page templates there was a previous attempt (in #253) with discussions and suggestions that I think are still relevant.
It would be interesting to be able to show a (structured, formatted…) list of all pages on a given page, maybe also through SSR — the SSR function could itself have access to the configuration, or even read all the contents on disk (like minisearch does).
Activity
Fil commentedon Apr 3, 2024
bloggy things happen? :)
fgregg commentedon Apr 3, 2024
@Fil, sorry for not being more concrete. I put some details in it.
Fil commentedon Apr 3, 2024
Interesting.
I don't know how better it is to write 2024-04-01-april-fool.md than having files in folders such as 2024/04/01-april-fool.md. It's probably convenient for some, but is the gain worth the cost, that is, losing the univocal mapping between file and url, and making relative links even more of a headache? Conversely, if you want a flat folder, can't you live with flat urls?
The "page's date is made available to the layout template" is related to #1036. I do want to have meta data (dates, authors, tags…) available to the page and to server-side rendering (SSR, #413).
Inferring a date from a file name seems like a minor affordance; it could be an application of a hook for inferring the page's meta data from front matter & file contents (it's already the case with the title, which can come from either front matter or from the first H1).
For page templates there was a previous attempt (in #253) with discussions and suggestions that I think are still relevant.
It would be interesting to be able to show a (structured, formatted…) list of all pages on a given page, maybe also through SSR — the SSR function could itself have access to the configuration, or even read all the contents on disk (like minisearch does).
Fil commentedon Apr 3, 2024
I think we should move this to a discussion, and create more actionable feature requests.
fgregg commentedon Apr 3, 2024
great idea, closing this in favor of https://github.com/observablehq/framework/discussions/1198
[-]support for jekyll-like blog patterns[/-][+]Support blogging-like functionality[/+]