You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, users need to define all metadata even the repetitive ones.
Expected: allow to set a default value for a series of metadata.
A way to do so would be to define a default.metada text file with default content. At load time, this file is concatenated as the first lines of metadata so that:
default values are available
default values may be overwritten by value defined in the content itself.
Example:
Currently, we can overwritte a metadata:
--- METADATA (first) ---
title galae - le service e-mail éthique et libre facturé à l'usage
slug fr-index
slug de-index
Will result with a slug metadata equal to de-index
So the behaviour would be:
default.metada file content:
lang fr
template_engine jinja
And a content file:
--- METADATA (first) ---
title galae - le service e-mail éthique et libre facturé à l'usage
slug fr-index
slug de-index
would result in a content equivalent to:
--- METADATA (first) ---
lang fr
template_engine jinja
title galae - le service e-mail éthique et libre facturé à l'usage
slug de-index
the settings.py configuration file would contain 2 new parameters:
JFME_DEFAULT_METADATA_FILEPATH = <path> which links to the file on the disk. The file is a text file without any header: only lines of metadata <metadata_name> <metadata_value>
JFME_DEFAULT_METADATA_STRING = "" which gives direct access to configuring default metadata in settings.py.
The order of include would be:
read metadata from setting.py found in JFME_DEFAULT_METADATA_STRING
read metadata from JFME_DEFAULT_METADATA_FILEPATH
read from content file itself
The text was updated successfully, but these errors were encountered:
JFME_DEFAULT_METADATA_STRING is replaced by JFME_DEFAULT_METADATA_DICT which is a dictionary, for a better format in a python file.
Example : JFME_DEFAULT_METADATA_DICT = {"slug": "index", "title": "Default title", "lang": "en"}
Currently, users need to define all metadata even the repetitive ones.
Expected: allow to set a default value for a series of metadata.
A way to do so would be to define a
default.metada
text file with default content. At load time, this file is concatenated as the first lines of metadata so that:Example:
Currently, we can overwritte a metadata:
Will result with a
slug
metadata equal tode-index
So the behaviour would be:
default.metada
file content:And a content file:
would result in a content equivalent to:
the
settings.py
configuration file would contain 2 new parameters:JFME_DEFAULT_METADATA_FILEPATH = <path>
which links to the file on the disk. The file is a text file without any header: only lines of metadata<metadata_name> <metadata_value>
JFME_DEFAULT_METADATA_STRING = ""
which gives direct access to configuring default metadata in settings.py.The order of include would be:
setting.py
found inJFME_DEFAULT_METADATA_STRING
JFME_DEFAULT_METADATA_FILEPATH
The text was updated successfully, but these errors were encountered: