diff --git a/README.md b/README.md index 7f76fc1..248fc48 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,10 @@ Otherwise, you have to configure the following settings : - `JFME_DOMAIN` : the domain name of your website, for instance `"https://www.example.com"` (used in sitemap file) - `JFME_CONTENT_DIRS` : a list of directories where to look for the site content +Other useful settings : +- Default metadata : `JFME_DEFAULT_METADATA_DICT` and `JFME_DEFAULT_METADATA_PATH` allow to set default metadata for pages and posts. The first one is a python dictionary and the second one is a Path to a file having the same format as metadata section in pages. +The order, from less to most priority is : `JFME_DEFAULT_METADATA_DICT` then `JFME_DEFAULT_METADATA_PATH` then page matadata. + ### `Dockerfile` : - In the `# Copy source dir` section, add `COPY / /` for each content directory in `JFME_CONTENT_DIRS` diff --git a/jssg/settings.py b/jssg/settings.py index 89fa47f..1d494de 100644 --- a/jssg/settings.py +++ b/jssg/settings.py @@ -52,8 +52,8 @@ JFME_POSTS_DIRS = [path / "posts" for path in JFME_CONTENT_DIRS] JFME_TEMPLATES_DIRS = [path / "templates" for path in JFME_CONTENT_DIRS] JFME_STATIC_DIRS = [path / "static" for path in JFME_CONTENT_DIRS] -JFME_DEFAULT_METADATA_DICT = {"slug": "index", } -JFME_DEFAULT_METADATA_PATH = BASE_DIR / "jssg" / "default_metadata.txt" +JFME_DEFAULT_METADATA_DICT = {"slug": "index", } # The order of include is : JFME_DEFAULT_METADATA_DICT then JFME_DEFAULT_METADATA_PATH then page metadata +JFME_DEFAULT_METADATA_PATH = BASE_DIR / "jssg" / "default_metadata.txt" # If a metadata is specified more than once, the last included is retained # Application definition