Closed MichaelHirn closed 7 months ago
@MichaelHirn What's the custom url that you want to assign?
search.pages()
only returns HTML pages. This means the url must end with .html
or /
(which is equivalent to /index.html
).
For example: /pathname
is a non-HTML page, it's just a file without extension. But /pathname/
is a HTML page because is exported to /pathname/index.html
.
Hey @oscarotero - that explains it then. I had a posts/2023-12-01-daily.md
page with date field like this
---
url: ./custom-post-url
---
I have since moved away from the -daily
slugs in the file name to posts/2023-12-01-custom-post-url.md
and got rid of the url
and it works. Judging by your answer I could probably keep it in the initial format and simple append .html
to the url
attribute value and it would also work?
You can append .html
or /
, depending on whether you prefer pretty urls or not. For example:
---
url: ./custom-post-url/
---
But in Lume 2, you have the variable basename
that is used to change the name of the file without worrying about extensions or pretty url configurations, so it's easier to do simply:
---
basename: custom-post-url
---
Version
2.0.1
Platform
mac
What steps will reproduce the bug?
url
data attribute.search.pages()
(make surerankingOrder
is greater than the Target Page)How often does it reproduce? Is there a required condition?
No response
What is the expected behavior?
Search Page returns the Target Page
What do you see instead?
Search Page does not find or return Target Page. No error or warning is raised either.
Additional information
No response