-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.txt
More file actions
executable file
·55 lines (44 loc) · 1.24 KB
/
index.txt
File metadata and controls
executable file
·55 lines (44 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
---
title: Comment
description: Comment feature.
icon: 'M17,12V3A1,1 0 0,0 16,2H3A1,1 0 0,0 2,3V17L6,13H16A1,1 0 0,0 17,12M21,6H19V15H6V17A1,1 0 0,0 7,18H18L22,22V7A1,1 0 0,0 21,6Z'
color: '#2a4b36'
author: Taufik Nurrohman
image: /lot/x/comment/index.png
type: Markdown
version: 3.1.0
...
### Installation
The comment system will be activated automatically, but you need to manually install the comment area in the layout
file. Edit `.\lot\y\*\page.php` file then put this snippet just after the `</article>` tag:
~~~ .php
<?= self::comments(); ?>
~~~
### Visibility
Set comment visibility on specific pages via page properties. Add this property to your page’s `state` property with one
of these values:
Value | Description
----- | -----------
`0` | Disable comments.
`1` | Enable comments (default).
`2` | Disable comments, but keep the published comments visible.
`false` | Alias for `0`.
`true` | Alias for `1`.
**Example:**
~~~ .yaml
---
title: Page Title
description: Page description.
author: Taufik Nurrohman
type: Markdown
state:
x:
comment: false
...
Page content.
~~~
To set pre-defined comment visibility globally, specify a comment visibility state on the first array of the layout
arguments:
~~~ .php
<?= self::comments([2]); ?>
~~~