tangled
alpha
login
or
join now
ladas552.me
/
Blog
0
fork
atom
My Blog, build with Norgolith
blog.ladas552.me
blog
0
fork
atom
overview
issues
pulls
pipelines
0.1.3 content schema in toml
Ladas552
1 year ago
d5f31cd2
e670b55b
+18
1 changed file
expand all
collapse all
unified
split
Rattman
norgolith.toml
+18
Rattman/norgolith.toml
···
7
7
[highlighter]
8
8
enable = false
9
9
# engine = 'prism' # Can be 'prism' or 'hljs'. Defaults to 'prism'
10
10
+
11
11
+
# Content Scheme
12
12
+
## Global options
13
13
+
[content_schema]
14
14
+
required = [ "title", "description", "authors", "categories" ]
15
15
+
16
16
+
## field rules
17
17
+
[content_schema.fields]
18
18
+
title = { type = "string", max_length = 30 }
19
19
+
description = { type = "string", max_length = 100 }
20
20
+
categories = { type = "array", items = { type = "string" }, min_items = 1 }
21
21
+
22
22
+
# publish date for '/posts'
23
23
+
[content_schema.posts.rules]
24
24
+
if = { draft = false }
25
25
+
then = { required = ["publish_date"] }
26
26
+
27
27
+