symplify/php7_sculpin

This package is abandoned and no longer maintained. The author suggests using the symplify/statie package instead.

Static Site Generator

v1.2.3 2016-10-26 22:35 UTC

This package is not auto-updated.

Last update: 2016-12-23 20:47:58 UTC


README

Build Status Quality Score Coverage Status Total Downloads Latest Version on Packagist

Sculpin takes Markdown files and combines them with Twig templates to produce a set of static HTML files.

Install via Composer

composer require symplify/php7_sculpin

Usage

Base commands

Generate content from /source to /output in HTML

vendor/bin/sculpin generate
vendor/bin/sculpin generate --server

Push content of /output to Github pages

vendor/bin/sculpin push-to-github-pages

Configuration

Global variables

EVERY .neon or .yaml found in /source directory is loaded to global variables. You can store variables, lists of data etc.

So this...

# config/config.neon
siteUrl: http://github.com
socials:
    facebook: http://facebook.com/github

...can be displayed in any template as:

# _layouts/default.latte
<p>Welcome to: {$siteUrl}</p>

<p>Checkout my FB page: {$socials['facebook']}</p>

Special configuration

To configure post url address just modify:

# config/config.neon
configuration:
    postRoute: blog/:year/:month/:day/:title # default one
    # will produce post detail link: blog/2016/12/01/how-to-host-open-source-blog-for-free

    # other examples:
    # :year/:month/:title => 2016/12/how-to-host-open-source-blog-for-free
    # :year/:title => 2016/how-to-host-open-source-blog-for-free
    # blog/:title => blog/how-to-host-open-source-blog-for-free