From ea8f8057f9ea5337b5241bb432d57163a3bd3a4b Mon Sep 17 00:00:00 2001 From: Gabriele Musco Date: Mon, 28 Jun 2021 11:53:28 +0200 Subject: [PATCH] documented post params, added param to disable comments for post --- README.md | 10 ++++++++++ layouts/partials/cactus_chat.html | 2 +- layouts/partials/commento.html | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a055e49..81c2c90 100644 --- a/README.md +++ b/README.md @@ -252,6 +252,16 @@ Ficurinia supports injecting custom content into the theme. There are several fi | `layouts/partials/inject/header-after.html` | Before closing the header | | `layouts/partials/inject/header-before.html` | At the beginning of the header | +# Post parameters + +Every post can have various parameters in the frontmatter, here are some that you may find useful + +- `title`: the title of the article +- `date`: usually automatically populated, holds the date and time of the post creation +- `tags`: a list of tags for your post +- `image`: a link to a feature image for the article, shown in the preview as well +- `comments`: boolean, if true it enables comments for the current post, if false it disables them (default is true) + # Does *Ficurinia* mean anything? It's Sicilian for Indian fig, also known as prickly pear cactus. diff --git a/layouts/partials/cactus_chat.html b/layouts/partials/cactus_chat.html index 187d9f1..12e9ee2 100644 --- a/layouts/partials/cactus_chat.html +++ b/layouts/partials/cactus_chat.html @@ -1,4 +1,4 @@ -{{ if site.Params.cactusCommentsSiteName }} +{{ if and site.Params.cactusCommentsSiteName (.Params.comments | default true) }} diff --git a/layouts/partials/commento.html b/layouts/partials/commento.html index 6dd39cc..e425eac 100644 --- a/layouts/partials/commento.html +++ b/layouts/partials/commento.html @@ -1,4 +1,4 @@ -{{ if .Site.Params.commento }} +{{ if and .Site.Params.commento (.Params.comments | default true) }}