documented post params, added param to disable comments for post

This commit is contained in:
Gabriele Musco 2021-06-28 11:53:28 +02:00
parent cc8ade35b9
commit ea8f8057f9
No known key found for this signature in database
GPG Key ID: 8539FD3454380B83
3 changed files with 12 additions and 2 deletions

View File

@ -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.

View File

@ -1,4 +1,4 @@
{{ if site.Params.cactusCommentsSiteName }}
{{ if and site.Params.cactusCommentsSiteName (.Params.comments | default true) }}
<script type="text/javascript" src="https://latest.cactus.chat/cactus.js"></script>
<link rel="stylesheet" href="https://latest.cactus.chat/style.css" type="text/css">

View File

@ -1,4 +1,4 @@
{{ if .Site.Params.commento }}
{{ if and .Site.Params.commento (.Params.comments | default true) }}
<script
defer
src="{{ .Site.Params.commento }}"