Closed lebouquetin closed 2 months ago
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"}
Merged in #40
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