1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-08 14:16:46 +02:00

Merge remote-tracking branch 'origin/dev'

This commit is contained in:
Awilum
2018-05-22 12:23:29 +03:00
5 changed files with 114 additions and 21 deletions

View File

@@ -1,3 +1,8 @@
# Flextype 0.4.2, 2018-05-22
* Settings: cache.enabled is true from now
* Content: new methods added: initShortcodes() initMarkdown() markdown()
* Events: new events added: onMarkdownInitialized and onShortcodesInitialized
# Flextype 0.4.1, 2018-05-20
* Fixing issues with cache for getPages() method.
* Fixing issues with processPage() method.

View File

@@ -1,14 +1,36 @@
# Flextype
![version](https://img.shields.io/badge/version-0.4.1-brightgreen.svg?style=flat-square "Version")
![version](https://img.shields.io/badge/version-0.4.2-brightgreen.svg?style=flat-square "Version")
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/flextype/flextype/blob/master/LICENSE.txt)
Flextype is next generation of Legendary Monstra Engine it is also Open Source, fast and flexible file-based Content Management System. That's Easy to install, upgrade and use. Flextype provides amazing API's for plugins, themes and core developers! Content in Flextype is just a simple files written with markdown syntax in pages folder. You simply create markdown files in the pages folder and that becomes a page.
## Requirements
## FEATURES
#### Simple
Easy to install, upgrade and use.
No installation needed, just copy files to your server!
#### Fast
Flextype is realy fast and lightweight!
No database required, flat files only!
#### Flexible
Flextype provides amazing API for plugins, themes and core developers!
#### Markdown Syntax
Use your favorite editor to write your content with plain Markdown syntax.
#### Dynamic Content Types
The flat-file nature of Flextype lets you define custom fields for any of your pages.
#### Open Source
Flextype is an open-source project licensed under the MIT LICENSE to set the world free!
## REQUIREMENTS
PHP 7.1.3 or higher with PHP's [Multibyte String module](http://php.net/mbstring)
Apache with [Mod Rewrite](http://httpd.apache.org/docs/current/mod/mod_rewrite.html)
## Installation
## INSTALLATION
#### Using (S)FTP
@@ -32,18 +54,43 @@ cd /flextype/site/themes/simple
npm install
```
## Contributing
1. Help on the [Forum.](http://forum.flextype.org)
2. Develop a new plugin.
3. Create a new theme.
4. Find and [report issues.](https://github.com/flextype/flextype/issues)
5. Link back to [Flextype](http://flextype.org).
## Links
## COMMUNITY
Flextype is open source, community driven project, and maintained by community!
* [Forum](http://forum.flextype.org)
* [Github Repository](https://github.com/flextype/flextype)
* [Gitter](https://gitter.im/flextype/flextype)
## NO LIMITS
With Flextype you can create any project you whant.
* Business site
* Landing page
* Personal site
* Portfolio
* Product site
* Documenation
* Personal resume
* Blog
## CONTRIBUTE
Flextype is an open source project and community contributions are essential to its growing and success. Contributing to the Flextype is easy and you can give as little or as much time as you want.
* Help on the [Forum.](http://forum.flextype.org)
* Develop a new plugin.
* Create a new theme.
* Find and [report issues.](https://github.com/flextype/flextype/issues)
* Link back to [Flextype](http://flextype.org).
* [Donate to keep Flextype free.](http://flextype.org/about/sponsors)
## LINKS
- [Site](http://flextype.org)
- [Forum](http://forum.flextype.org)
- [Documentation](http://flextype.org/documentation)
- [Github Repository](https://github.com/flextype/flextype)
## License
## LICENSE
See [LICENSE](https://github.com/flextype/flextype/blob/master/LICENSE.md)

View File

@@ -73,14 +73,11 @@ class Content
// Event: The page is not processed and not sent to the display.
Event::dispatch('onPageBeforeRender');
// Create Markdown Parser object
Content::$markdown = new Markdown();
// Init Markdown
Content::initMarkdown();
// Create Shortcode Parser object
Content::$shortcode = new ShortcodeFacade();
// Register default shortcodes
Content::registerDefaultShortcodes();
// Init Shortcodes
Content::initShortcodes();
// Set current requested page data to $page array
Content::$page = Content::getPage(Http::getUriString());
@@ -323,6 +320,17 @@ class Content
}
}
/**
* Returns $markdown object
*
* @access public
* @return object
*/
public static function markdown() : Markdown
{
return Content::$markdown;
}
/**
* Returns $shortcode object
*
@@ -461,6 +469,39 @@ class Content
});
}
/**
* Init Markdown
*
* @access protected
* @return void
*/
protected static function initMarkdown() : void
{
// Create Markdown Parser object
Content::$markdown = new Markdown();
// Event: Markdown initialized
Event::dispatch('onMarkdownInitialized');
}
/**
* Init Shortcodes
*
* @access protected
* @return void
*/
protected static function initShortcodes() : void
{
// Create Shortcode Parser object
Content::$shortcode = new ShortcodeFacade();
// Register default shortcodes
Content::registerDefaultShortcodes();
// Event: Shortcodes initialized and now we can add our custom shortcodes
Event::dispatch('onShortcodesInitialized');
}
/**
* Display current page
*

View File

@@ -40,7 +40,7 @@ class Flextype
*
* @var string
*/
const VERSION = '0.4.1';
const VERSION = '0.4.2';
/**
* Constructor.

View File

@@ -24,7 +24,7 @@ errors:
display: true
cache:
enabled: false
enabled: true
prefix: flextype
driver: auto
lifetime: 604800