Skip to content
This repository has been archived by the owner on Aug 13, 2024. It is now read-only.

Create a metadata system #12

Open
joseluis opened this issue Nov 28, 2016 · 0 comments
Open

Create a metadata system #12

joseluis opened this issue Nov 28, 2016 · 0 comments

Comments

@joseluis
Copy link
Member

joseluis commented Nov 28, 2016

Define a metadata directive.

It could support both single line and multi-line format. E.g.:

<--$ metakey : value -->

<--$
metakeykey : value
metakeykey : value
-->

Define a metadata template tag:

They should be parsed in block the first thing just after parsing the includes and removing the comments, but before parsing the metadata directive. So that they can be used anywhere in the template, even inside the directives.

{{metakey}}
{{metakey : template }}

Using the template tag should call a specialize function for metadata retrieval, with the following steps:

  1. Look for the pertinent template key into the metadata storage declarative array, and if it exist:
    1. Try to retrieve the pertinent metakey.
    2. If it doesn't exist it means it hasn't been specified in the template, so use the default behaviour.
  2. If no key exist for the template, it means it hasn't been fetched yet.
    1. Try to fetch the metadata from the template file and store it in the database.
    2. Repeat step 1; avoid recursive loop.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant