mirror of
https://github.com/flextype/flextype.git
synced 2025-08-19 11:21:30 +02:00
1. Move from JSON to FRONTMATTER (html)
This commit is contained in:
@@ -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
|
||||
|
@@ -26,7 +26,7 @@ class Parser
|
||||
public static $parsers = [
|
||||
'frontmatter' => [
|
||||
'name' => 'frontmatter',
|
||||
'ext' => 'md',
|
||||
'ext' => 'html',
|
||||
],
|
||||
'json' => [
|
||||
'name' => 'json',
|
||||
|
@@ -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
|
||||
---
|
||||
|
Reference in New Issue
Block a user