Skip to content

Page metadata #3

Description

@alterae

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions