1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-19 11:21:30 +02:00

feat(core): update site entries #212 #186

1. Move from JSON to FRONTMATTER (html)
This commit is contained in:
Awilum
2019-08-21 19:51:10 +03:00
parent 8a50d92ef3
commit 04da55c6e2
12 changed files with 18 additions and 17 deletions

View File

@@ -268,9 +268,9 @@ class Entries
// Whether the requested entry is a director and whether the file entry is in this directory.
if ($current_entry['type'] === 'dir' && (
// @todo refactoring this
Filesystem::has($current_entry['path'] . '/entry.md') ||
Filesystem::has($current_entry['path'] . '/entry.json') ||
Filesystem::has($current_entry['path'] . '/entry.yaml')
Filesystem::has($current_entry['path'] . '/entry' . '.' . Parser::$parsers['frontmatter']['ext']) ||
Filesystem::has($current_entry['path'] . '/entry' . '.' . Parser::$parsers['json']['ext']) ||
Filesystem::has($current_entry['path'] . '/entry' . '.' . Parser::$parsers['yaml']['ext'])
)) {
// Get entry uid
// 1. Remove entries path

View File

@@ -26,7 +26,7 @@ class Parser
public static $parsers = [
'frontmatter' => [
'name' => 'frontmatter',
'ext' => 'md',
'ext' => 'html',
],
'json' => [
'name' => 'json',

View File

@@ -1,13 +1,14 @@
---
title: Gallery
template: gallery
description: ''
menu_item_title: Gallery
menu_item_url: gallery
menu_item_target: _self
menu_item_order: '3'
fieldset: gallery
published_at: 1564409150
created_at: 1564409150
uuid: 9c36d0d1-3c4c-4c93-ad96-cae39e1966ec
---
---
title: Gallery
template: gallery
description: ''
menu_item_title: Gallery
menu_item_url: gallery
menu_item_target: _self
menu_item_order: '3'
fieldset: gallery
published_at: 1564409150
created_at: 1564409150
uuid: 9c36d0d1-3c4c-4c93-ad96-cae39e1966ec
---