Skip to content

Commit

Permalink
Site 1.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Awilum committed Dec 7, 2020
1 parent 45713c2 commit d9e6d8d
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 12 deletions.
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Global
.composer
composer.lock
package-lock.json
vendor/
node_modules/
dist/

# Flextype Site Specific
var/

# OS Generated
.DS_Store*
ehthumbs.db
Icon?
Thumbs.db
*.swp

# phpstorm
.idea/*
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.5.0"></a>
# [1.5.0](https://github.com/flextype-plugins/site/compare/v1.4.0...v1.5.0) (2020-12-07)

### Features

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

<a name="1.4.0"></a>
# [1.4.0](https://github.com/flextype-plugins/site/compare/v1.3.0...v1.4.0) (2020-08-25)

Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2018-2020 Sergey Romanenko
Copyright (c) 2021 Sergey Romanenko

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 3 additions & 3 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.11-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.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>
</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.11 | [download](https://github.com/flextype/flextype/releases) |
| [flextype](https://github.com/flextype/flextype) | 0.9.12 | [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 Expand Up @@ -136,4 +136,4 @@ $highlight = flextype('registry')->get('themes.noir.settings.highlight');

## LICENSE
[The MIT License (MIT)](https://github.com/flextype-plugins/site/blob/master/LICENSE.txt)
Copyright (c) 2018-2020 [Sergey Romanenko](https://github.com/Awilum)
Copyright (c) 2021 [Sergey Romanenko](https://github.com/Awilum)
4 changes: 2 additions & 2 deletions app/Controllers/SiteController.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ public function index(Request $request, Response $response, array $args) : Respo
}

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

// is entry not found
$is_entry_not_found = false;

// If entry body is not false
if ($entry_body) {
if (is_array($entry_body) and count($entry_body) > 0) {
// Get 404 page if entry visibility is draft or hidden and if routable is false
if ((isset($entry_body['visibility']) && ($entry_body['visibility'] === 'draft' || $entry_body['visibility'] === 'hidden')) ||
(isset($entry_body['routable']) && ($entry_body['routable'] === 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 @@ -50,8 +50,8 @@ public function init() : void
$themes_cache_id = $this->getThemesCacheID($themes_list);

// Get themes list from cache or scan themes folder and create new themes cache item in the registry
if (flextype('cache')->contains($themes_cache_id)) {
flextype('registry')->set('themes', flextype('cache')->fetch($themes_cache_id));
if (flextype('cache')->has($themes_cache_id)) {
flextype('registry')->set('themes', flextype('cache')->get($themes_cache_id));
} else {
$themes = [];
$themes_settings = [];
Expand Down Expand Up @@ -119,7 +119,7 @@ public function init() : void
flextype('registry')->set('themes', $themes);

// Save parsed themes list in the cache
flextype('cache')->save($themes_cache_id, $themes);
flextype('cache')->set($themes_cache_id, $themes);
}

// Emit onThemesInitialized
Expand Down
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
"require": {
"php": ">=7.3.0",
"ext-json": "*",
"middlewares/trailing-slash": "~1.1.0"
"middlewares/trailing-slash": "~1.1.0",
"flextype-components/arrays" : "3.0.1",
"flextype-components/filesystem": "2.0.8"
},
"config": {
"apcu-autoloader": true,
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.4.0
version: 1.5.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.11
flextype: 0.9.12
twig: '>=1.0.0'

0 comments on commit d9e6d8d

Please sign in to comment.