Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add site.page(path) and site.document(path) #172

Closed
ia3andy opened this issue Oct 10, 2024 · 0 comments · Fixed by #176
Closed

Add site.page(path) and site.document(path) #172

ia3andy opened this issue Oct 10, 2024 · 0 comments · Fixed by #176
Milestone

Comments

@ia3andy
Copy link
Contributor

ia3andy commented Oct 10, 2024

This will allow to find pages by id. This way user won't have to resolve any url by themselves
For example:

{site.page('rss.xml').url}
{site.page('/pages/about.html').url}

{site.document('_posts/my-post.md').url}

We should also remove the rootUrl from site, it is available from the site.url.root if really needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant