Static Site And Prototype Generator. He is nothing but pretty face.
HTML PHP ApacheConf Other
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
cache
entries
etc
layouts/_global
logs
media
output
plugins
resources
src
test
.gitignore
.htaccess
.travis.yml
README.md
composer.json
dev.php
index.php
phpunit.travis.xml
phpunit.xml.dist

README.md

logo

The Vaseman Prototype System

Travis Latest Stable Version Total Downloads Latest Unstable Version License

Vaseman is nothing but only pretty face. He is a prototype system and static site generator.

Installation

Install by Download

Please download from here: https://github.com/asika32764/vaseman/releases

Install by Composer

$ php composer.phar create-project asika/vaseman [project-dir] 2.*

Getting Started

View Pages

Open project dir by browser, you can see the index page.

index

And click Admin button on top left, this is a back-end page example.

admin

Writing Pages

Just create your *.twig in entries folder.

The template file path are match the url path. If you go path/to/your/page, Vaseman will render entries/path/to/your/page.twig for you.

Base URI

Using {{ uri.base }} to add subfolder for assets url.

For Example, If you put your project in http://localhost/subfolder

<script src="{{ uri.base }}assets/js/main.js"></script>

Will render as:

<script src="/subfolder/assets/js/main.js"></script>

That avoid the loading failure by relative path.

Helper

Create your own helper class in src/Helper:

<?php
// src/Helper/Myhelper.php

namespace Vaseman\Helper;

use Vaseman\Helper\Set\AbstractHelper as Helper;

class Myhelper extends AbstractHelper
{
    public function getSomeThing($foo = '')
    {
        return 'Something is ' . $foo;
    }
}

Then you can use this helper in templates:

<div class="{{ helper.myhelper.getSomeThing('bar') }}"></div>

License

GNU General Public License version 2 or later;

Resources

About Windwalker

https://github.com/ventoviro/windwalker

About Twig

http://twig.sensiolabs.org/