Closed hpfast closed 3 months ago
The url of the pages is '/post/'+article.publish.slug
, which I assume it doesn't end with /
or .html
.
search.pages()
only returns html pages, and Lume only consider HTML pages those which the .html
extension in the url or ending with /
(which is equivalent to /index.html
). See this.
Right, adding /
to the end of the url makes the pages show up ...
So it is related to generating pages indirectly, in that when setting the url
field yourself you need to be aware of the behaviour. Which is well-documented, but I lost sight of the connection. Good to have the two parts of the documentation linked together by this issue!
Thanks!
Version
2.2.2
Platform
Linux
What steps will reproduce the bug?
Using the following
posts.page.ts
andlayout.vto
, generated items are not found bysearch.pages()
.posts.page.ts:
template:
How often does it reproduce? Is there a required condition?
No response
What is the expected behavior?
posts should show up in search results.
What do you see instead?
I think I've confirmed that it doesn't have to do with the async nature of the datasource by replacing that with a literal array -- same result. But I'm not sure ...
I also think it's not
renderOrder
(for example, #275 ) because I've inspected the pages in bothbeforeRender
andafterRender
events and the renderOrder is as I set it in my page files.I do think it has to do with the generated nature of the pages, because if I modify the
search.pages()
query -- for example, to!url^=/post
then I get all my items with a direct file origin.The generated pages do get rendered and have urls starting with
/post
.I can't tell the difference between my setup and the examples in the docs ... using top-level await or a literal array doesn't seem to make a difference.
Additional information
I can't figure it out ... any ideas?