Skip to content

Commit 114f900

Browse files
committed
rename "frontmatter" to "meta"
1 parent 54cb13a commit 114f900

File tree

4 files changed

+18
-10
lines changed

4 files changed

+18
-10
lines changed

src/model/comment.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ let extract_frontmatter docs : _ =
150150
List.fold_left
151151
(fun (fm_acc, content_acc) doc ->
152152
match doc.Location_.value with
153-
| `Code_block (Some "frontmatter", content, None) ->
153+
| `Code_block (Some "meta", content, None) ->
154154
(parse_frontmatter content.Location_.value :: fm_acc, content_acc)
155155
| _ -> (fm_acc, doc :: content_acc))
156156
([], []) docs
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
{0 Title}
1+
{0 One frontmatter}
22

3-
{@frontmatter[
3+
{@meta[
44
bli1: bloblobloblo1
55
bli2: bloblobloblo2
66
]}

test/pages/frontmatter.t/run.t

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,16 @@ When there is one frontmatter, it is extracted from the content:
3434
"one_frontmatter"
3535
]
3636
},
37-
"title"
37+
"one-frontmatter"
3838
]
3939
},
4040
[
4141
{
42-
"`Word": "Title"
42+
"`Word": "One"
43+
},
44+
"`Space",
45+
{
46+
"`Word": "frontmatter"
4347
}
4448
]
4549
]
@@ -80,12 +84,16 @@ When there is more than one frontmatter, they are all extracted from the content
8084
"two_frontmatters"
8185
]
8286
},
83-
"title"
87+
"two-frontmatters"
8488
]
8589
},
8690
[
8791
{
88-
"`Word": "Title"
92+
"`Word": "Two"
93+
},
94+
"`Space",
95+
{
96+
"`Word": "frontmatters"
8997
}
9098
]
9199
]
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
{0 Title}
1+
{0 Two frontmatters}
22

3-
{@frontmatter[
3+
{@meta[
44
bli1: bloblobloblo1
55
bli2: bloblobloblo2
66
]}
77

8-
{@frontmatter[
8+
{@meta[
99
bli3: bloblobloblo1
1010
]}

0 commit comments

Comments
 (0)