diasbruno/stc
Composer 安装命令:
composer require diasbruno/stc
包简介
static pages.
README 文档
README
A static page generator.
The main objective of stc is to make a simple and extensible static page generator.
Getting started
You will need composer. That's it.
Create your composer file and added the STC core engine.
{
...
"require": {
"diasbruno/stc": "dev-master"
}
}
In the same path as your composer.json file, creates your project file (project.php).
This should be enough to have a start project.
<?php
// the same directory where your composer file is located.
$current_dir = dirname(__FILE__);
require $current_dir . '/vendor/autoload.php';
use STC\Config;
// sets the directory where the data is stored.
// 'data' is a directory in the root of the project.
if (Application::bootstrap($current_dir, 'data')) {
/* register databases and writers.
* they work this way, because, maybe, you want to extend
* some of the plugins to your needs.
* NOTE: STC\PageDatabase and new STC\PageWriter must be loaded, or their extended classes.
* NOTE: STC\PostDatabase and new STC\PostWriter are plugins (stc-posts)...
*/
Application::register_database(new STC\PageDatabase);
Application::register_writer(new STC\PageWriter);
Application::register_database(new STC\PostDatabase);
Application::register_writer(new STC\PostWriter);
// user category database and writer classes.
Application::register_database(new CategoryDatabase);
Application::register_writer(new CategoryWriter);
// then, execute the generator.
Application::run();
}
LICENSE
Released under the MIT license.
统计信息
- 总下载量: 48
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 3
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-11-18