2017 © Pedro Peláez
 

library stc

static pages.

image

diasbruno/stc

static pages.

  • Tuesday, November 25, 2014
  • by diasbruno
  • Repository
  • 0 Watchers
  • 0 Stars
  • 37 Installations
  • PHP
  • 3 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

stc

Build Status, (*1)

A static page generator., (*2)

The main objective of stc is to make a simple and extensible static page generator., (*3)

Getting started

You will need composer. That's it., (*4)

Create your composer file and added the STC core engine., (*5)

{
  ...
  "require": {
    "diasbruno/stc": "dev-master"
  }
}

In the same path as your composer.json file, creates your project file (project.php)., (*6)

This should be enough to have a start project., (*7)

<?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., (*8)

The Versions

25/11 2014

dev-master

9999999-dev

static pages.

  Sources   Download

MIT

The Requires

 

by Bruno Dias