Installation

Install by Download

Please download from Github, then run composer install to install vendors.

Or just use Phar file.

Install by Composer

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

Install By Git

git clone https://github.com/asika32764/vaseman vaseman
cd vaseman
composer install

Build your phar file

After vendor installed. Run this command:

$ php bin/build.php -d=../../vaseman.phar

Default Pages

Now we can use browser open Vaseman root, Vaseman will render page dynamically.

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

We'll convert default lorem text to English version in the future. Currently is Traditional Chinese.

The Chinese lorem generated by: MoreText.js

Writing Pages

Create your *.twig in entries folder.

The template file path will matches 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 are in a page foo/bar/baz.html, You can use this url as link href:

<a href="{{ uri.base }}sakura.html">Link</a>

The link will render as:

<a href="../../sakura.html">Link</a>

So the page link will not break in every pages.

Help improve our documentation