hyde
hyde copied to clipboard
Allow posts with no date field for sections sorted by date.
Having content/_index.md
like this
+++
sort_by = "date"
+++
Allows to show on home page only posts having a date
metadata.
Sometimes it is useful to create a page
like an /about/
that is not listed on home page but accessible only via link.
Currently hyde is failing because date
filter requires a date.
I don't think it would work. Pages in a sorted section missing the sort attribute are ignored in Zola and I don't think they get rendered? I could be wrong, haven't done it in a long time so the memory is fuzzy
@Keats I created a page without a date, because I dont wanted it to get indexed, wanted acessible by url only.
Zola ignores that page when building the index, but the page is rendered when accessed by URL.
Is there other way to creates pages like /about
that should not be listed on section index?
I totally get the reason, in my memory the ignored pages were not rendered.
Is there other way to creates pages like /about that should not be listed on section index?
Not really, I usually prefer namespacing to /blog or whatever personally. I don't think there is a way to do to handle your case nicely.
@Keats What I am doing is:
- My
post-title.md
has adate
in front-matter, then it is a post and is indexed on my/
page. - My file
page_name.md
doesn't has a date, it is a static page, so Zola ignores that page onindex|section.html
, but renders it opage.html
. - As long as my
_index.md
has asort_by = 'date'
it would help more if we can have a list_on_index = false