pageon / stitcher-core

High performance, static websites for PHP developers
MIT License
147 stars 6 forks source link
performance php static-site twig

Stitcher Build Status Scrutinizer Code Quality Code Coverage

High performance, static websites for PHP developers.

composer create-project pageon/stitcher

Why Stitcher?

Stitcher differs from many other static site generator in two areas. First of all: performance is key. Stitcher is built from its core for high performance websites. All tools available to you put performance on the first place. Secondly, it doesn't try to add extra syntax to existing formats. Stitcher provides a robust set of tools for developers to build with, and not a lot of hacks so everything fits in one file.

Also important to note, included with Stitcher:

A quick look at Stitcher:

# site.yml

/blog:
    template: blog
    variables:
        posts: data/blog.yml

/blog/{id}:
    template: blog.post
    variables:
        post: data/blog.yml
    adapters:
        collection:
            variable: post
            field: id
# data/blog.yml

hello_world:
    date: 2017-03-10
    highlight: false
    title: Hello world
    content: blog/hello.md
    image: hello_world.jpg

foo_bar:
    date: 2017-03-14
    highlight: true
    title: Foo Bar
    content: blog/far_bar.md
    image: foo_bar.jpg 
<!-- blog.post.html --> 

{% extends 'index.html' %}

{% block content %}
    <article>
        <h1>{{ blog.title }}</h1>

       <img src="https://github.com/pageon/stitcher-core/raw/master/{{ blog.image.src }}" 
            srcset="{{ blog.image.srcset }}" 
            sizes="{{ blog.image.sizes }}" alt="{{ blog.image.alt }}"/>

        {{ blog.content }}
    </article>
{% endblock %}

You can read more about it on the Stitcher website.