[READ-ONLY] Modern and Simple Static Site Generator in PHP
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin [PackageBuilder] Add ParameterGuide [closes #1128] Sep 30, 2018
docs [Statie] Add logo, closes Symplify/Symplify#1114 Sep 27, 2018
packages [PackageBuilder] Remove need of default [] for autowired array arguments Oct 15, 2018
src [PackageBuilder] Remove need of default [] for autowired array arguments Oct 15, 2018
tests [Statie] Fix test of missing configuration Oct 1, 2018
.gitattributes
.gitignore [Statie] add test for translation, bit refactoring Mar 12, 2017
.travis.yml
LICENSE Update LICENSE year forever Jan 2, 2018
README.md [Statie] Add logo, closes Symplify/Symplify#1114 Sep 27, 2018
composer.json
gulpfile.js [Statie] misc Mar 12, 2017
phpunit.xml phpunit.xml: fix missing suite name Jun 2, 2018

README.md

Statie - Modern and Simple Static Site Generator in PHP

Build Status Downloads Subscribe

Statie takes HTML, Markdown and Twig or Latte files and generates static HTML page.

Install

composer require symplify/statie

How to Generate and See the Website?

  1. Prepare content for Statie... Simple index.twig would do for start, but you can also inspire in tomasvotruba.cz personal website.

  2. Generate static site from /source (argument) to /output (default value) in HTML:

vendor/bin/statie generate source
  1. Run local PHP server
php -S localhost:8000 -t output
  1. And see web in browser localhost:8000.

Configuration

statie.yml Config

This is basically config.yml Symfony Kernel that you know from Symfony apps. You can.

1. Add Parameters

# statie.yml
parameters:
    site_url: http://github.com

    socials:
        facebook: http://facebook.com/github

...that are available in every template:

# source/_layouts/default.latte

<p>Welcome to: {$site_url}</p>

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

2. Import other configs

# statie.yml
imports:
    - { resource: 'data/favorite_links.yml' }

parameters:
    site_url: http://github.com
    socials:
        facebook: http://facebook.com/github

...and split long configuration into more smaller files:

# data/favorite_links.yml
parameters:
    favorite_links:
        blog:
            name: "Suis Marco"
            url: "http://ocramius.github.io/"

3. And Register Services

services:
    App\SomeService: ~

    App\TweetService:
        arguments:
          - '%twitter.api_key%'

Documentation

See documentation at www.statie.org.

Pick a Templating You Like

parameters:
    templating: 'latte'
    # or
    templating: 'twig'

Who Runs on Statie?

See what Statie can do and how community uses it:

Do you run on Statie too? Let the world know and send a PR to add your website here.

Contributing

Open an issue or send a pull-request to main repository.