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

Page metadata #3

Open
alterae opened this issue Oct 15, 2022 · 0 comments
Open

Page metadata #3

alterae opened this issue Oct 15, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@alterae
Copy link
Owner

alterae commented Oct 15, 2022

Templates should have access to more information about the current page than just its content. They should be able to see any custom data defined in that page (see #7), as well as probably the path to the page and any children (see #4).

It would probably make sense to stick all this data under a page variable structured like so:

[page]
path = "path/to/page.html"
data = {} # hashmap of metadata defined in the page
children = [] # array of child pages
content = "" # page content 

This will probably rewrite significant refactoring, the implementation of some kind of page struct, and a way to do frontmatters. Child pages might also necessitate path normalization.

@alterae alterae added the enhancement New feature or request label Oct 15, 2022
This was referenced Oct 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant