From c1304581e6392d3430983c5b68ccc2d23a8d6719 Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Tue, 14 Apr 2020 21:28:05 +0800 Subject: [PATCH] README: document per-post theme_config --- README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7e30de4..172b9a0 100644 --- a/README.md +++ b/README.md @@ -149,7 +149,12 @@ By default, the timestamp and the URL of any new post will be generated automati { "url": "some-awesome-url", "timestamp": "YYYY-mm-dd", - "unlist": true + "unlist": true, + "theme_config": { + "no_itte": false, + "itte_page_path": "...", + ... + } } ``` ~~~ @@ -160,6 +165,12 @@ By default, the timestamp and the URL of any new post will be generated automati `unlist` / `unlisted`: when set to `true`, the post won't appear in home page, while still being accessible via its URL. +`theme_config`: OPTIONAL. You can pass parameters to the theme via this option. This will be available in `post.hbs` as the `theme_config` variable in execution context. Consult the theme for detailed information on what's available. For the default theme: + +`theme_config.no_itte`: OPTIONAL. When set to true, there will be no Itte comment box on this post. + +`theme_config.itte_page_path`: OPTIONAL. Override the path that identifies the page in Itte database. This is useful for migration from another blog software also using Itte. You can use this to instruct Itte to behave as if the page URL hasn't changed. + Normally, if such a customization header is not present, a post's metadata (URL and timestamp) will not be updated when you update a post. However, when this header is present, then the metadata will __always__ be updated. When a post's `url` is changed, the old one will become an alias, 302-redirected to the new one.