PHP static blog generator ala Jekyll with tags, categories and blocks in native.
Before, you must have composer to install and use Phantastic.
You can install Phantastic following 3 possible ways:
composer update
git clone https://github.com/malenkiki/phantastic.git
and then do the same action like seen previously after untar. Unlike previous, you get the dev-master
branch.composer create-project malenki/phantastic your-project-name dev-master
, where your-project-name
will be the directory to install Phantastic and then you can start to play with it.You can use command line options or write a configuration file in YAML.
Call ./phantastic --help
or without args to have some help.
Like you already do with Jekyll! You write some markdown post text files with YAML header and that's all folks!
A post must have at least two properties: layout
and title
. The first give the name of the template to use, the second is the post's title.
So, this is a correct minimal post:
---
layout: my-template
title: Some Very Important Heading
---
# Blah Blah
A short sentence.
Blocks are pieces of text written using markdown syntax.
This files are saved into their own directory.
Into template PHP files, you can call this blocks like you want, following some tags of the posts, or directly.
So, all text can be defined outside of templates.
Categories are autodefined by directories' hierarchy used into posts' directory. But, you can also associated this directories to other names by using YAML configuration file.
To link directories to their right name, do following, for example:
categories
some_dir: My Category
some_other_dir: Another Category Name
last_butnot_the_least_dir: This Category Is A Must Have!
Well, tags are… tags :) You can defined some tags for each of your posts into YAML header like follow:
tags:
- foo
- bar
- something
So, when generator runs, it creates tag pages, and a cloud tags is available!
Yes, you can add anything you want into YAML header to use it later into your template.
Later… I must improve this project yet before go further into the doc, but it is functional like you can see live example here: http://www.decouverte-patrimoine.fr/.