Skip to content

Commit

Permalink
Site 1.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Awilum committed Dec 20, 2020
1 parent d9e6d8d commit 507c558
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 9 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
<a name="1.6.0"></a>
# [1.6.0](https://github.com/flextype-plugins/site/compare/v1.5.0...v1.6.0) (2020-12-20)

### Features

* **core** update code base for new Flextype 0.9.13

<a name="1.5.0"></a>
# [1.5.0](https://github.com/flextype-plugins/site/compare/v1.4.0...v1.5.0) (2020-12-07)

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<h1 align="center">Site Plugin for <a href="http://flextype.org/">Flextype</a></h1>

<p align="center">
<a href="https://github.com/flextype-plugins/site/releases"><img alt="Version" src="https://img.shields.io/github/release/flextype-plugins/site.svg?label=version&color=black"></a> <a href="https://github.com/flextype-plugins/site"><img src="https://img.shields.io/badge/license-MIT-blue.svg?color=black" alt="License"></a> <a href="https://github.com/flextype-plugins/site"><img src="https://img.shields.io/github/downloads/flextype-plugins/site/total.svg?color=black" alt="Total downloads"></a> <a href="https://github.com/flextype/flextype"><img src="https://img.shields.io/badge/Flextype-0.9.12-green.svg" alt="Flextype"></a> <a href=""><img src="https://img.shields.io/discord/423097982498635778.svg?logo=discord&color=black&label=Discord%20Chat" alt="Discord"></a>
<a href="https://github.com/flextype-plugins/site/releases"><img alt="Version" src="https://img.shields.io/github/release/flextype-plugins/site.svg?label=version&color=black"></a> <a href="https://github.com/flextype-plugins/site"><img src="https://img.shields.io/badge/license-MIT-blue.svg?color=black" alt="License"></a> <a href="https://github.com/flextype-plugins/site"><img src="https://img.shields.io/github/downloads/flextype-plugins/site/total.svg?color=black" alt="Total downloads"></a> <a href="https://github.com/flextype/flextype"><img src="https://img.shields.io/badge/Flextype-0.9.13-green.svg" alt="Flextype"></a> <a href=""><img src="https://img.shields.io/discord/423097982498635778.svg?logo=discord&color=black&label=Discord%20Chat" alt="Discord"></a>
</p>

Site plugin to display entries content on the website frontend.
Expand All @@ -14,7 +14,7 @@ The following dependencies need to be downloaded and installed for Site Plugin.

| Item | Version | Download |
|---|---|---|
| [flextype](https://github.com/flextype/flextype) | 0.9.12 | [download](https://github.com/flextype/flextype/releases) |
| [flextype](https://github.com/flextype/flextype) | 0.9.13 | [download](https://github.com/flextype/flextype/releases) |
| [twig](https://github.com/flextype-plugins/twig) | >=1.0.0 | [download](https://github.com/flextype-plugins/twig/releases) |
| [noir](https://github.com/flextype-themes/noir) | >=1.0.0 | [download](https://github.com/flextype-themes/noir/releases) |

Expand Down
2 changes: 1 addition & 1 deletion app/Controllers/SiteController.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function index(Request $request, Response $response, array $args) : Respo
}

// Get entry body
$entry_body = flextype('entries')->fetchSingle($entry_uri)->toArray();
$entry_body = flextype('entries')->fetch($entry_uri)->toArray();

// is entry not found
$is_entry_not_found = false;
Expand Down
6 changes: 3 additions & 3 deletions app/Models/Themes.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function init() : void
if (trim($default_theme_settings_file_content) === '') {
$default_theme_settings = [];
} else {
$default_theme_settings = flextype('yaml')->decode($default_theme_settings_file_content);
$default_theme_settings = flextype('serializers')->yaml()->decode($default_theme_settings_file_content);
}

// Create custom theme settings file
Expand All @@ -97,7 +97,7 @@ public function init() : void
if (trim($custom_theme_settings_file_content) === '') {
$custom_theme_settings = [];
} else {
$custom_theme_settings = flextype('yaml')->decode($custom_theme_settings_file_content);
$custom_theme_settings = flextype('serializers')->yaml()->decode($custom_theme_settings_file_content);
}

// Check if default theme manifest file exists
Expand All @@ -107,7 +107,7 @@ public function init() : void

// Get default theme manifest content
$default_theme_manifest_file_content = Filesystem::read($default_theme_manifest_file);
$default_theme_manifest = flextype('yaml')->decode($default_theme_manifest_file_content);
$default_theme_manifest = flextype('serializers')->yaml()->decode($default_theme_manifest_file_content);

// Merge theme settings and manifest data
$themes[$theme['dirname']]['manifest'] = $default_theme_manifest;
Expand Down
4 changes: 2 additions & 2 deletions plugin.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Site
version: 1.5.0
version: 1.6.0
description: Site plugin to display entries content on the website frontend.
icon: fas fa-globe
author:
Expand All @@ -11,5 +11,5 @@ bugs: https://github.com/flextype-plugins/site/issues
license: MIT

dependencies:
flextype: 0.9.12
flextype: 0.9.13
twig: '>=1.0.0'
7 changes: 6 additions & 1 deletion routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,9 @@
* file that was distributed with this source code.
*/

flextype()->get('{uri:.+}', 'SiteController:index')->setName('site.index')->add('csrf');
use Slim\Http\Environment;
use Slim\Http\Uri;

if (! flextype()->isApiRequest()) {
flextype()->get('{uri:.+}', 'SiteController:index')->setName('site.index')->add('csrf');
}

0 comments on commit 507c558

Please sign in to comment.