1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-22 04:42:57 +02:00

feat(serializers): add ability to set custom frontmatter header parser flag

This commit is contained in:
Awilum
2022-05-13 18:56:44 +03:00
parent b70e32d6ed
commit 2dc20b9f54
9 changed files with 66 additions and 10 deletions

View File

@@ -0,0 +1,4 @@
---json
{"title": "Frontmatter JSON"}
---
Content is here.

View File

@@ -0,0 +1,4 @@
---json5
{title: "Frontmatter JSON5"}
---
Content is here.

View File

@@ -0,0 +1,4 @@
---neon
title: "Frontmatter NEON"
---
Content is here.

View File

@@ -0,0 +1,4 @@
---yaml
title: "Frontmatter YAML"
---
Content is here.

View File

@@ -476,11 +476,11 @@ serializers:
cache: true
header:
serializer: yaml
allowed: ['yaml', 'json', 'neon']
allowed: ['yaml', 'json', 'json5', 'neon']
encode:
header:
serializer: yaml
allowed: ['yaml', 'json', 'neon']
allowed: ['yaml', 'json', 'json5', 'neon']
neon:
decode:
cache: true