Spress is a static site generator built with Symfony components. See demo.
License: MIT.
- Linux, Unix, Mac OS X or Windows.
- PHP >= 5.5.
- Composer.
- Documentation: spress.yosymfony.com.
- Mention @spress_cms on Twitter.
Discuss and share your opinions in Gitter chat:
![Gitter](https://badges.gitter.im/Join Chat.svg)
When Contributing code to Spress, you must follow its coding standards. Spress follows PSR-2 coding style.
Keep in mind a golden rule: Imitate the existing Spress code.
- Fork the Spress repository.
- Create a new branch for each feature or improvement.
- Send a pull request from each feature branch to master branch or appropriated.
All pull requests must be accompanied by passing unit tests. Spress uses phpunit for testing.
- Download the last release or clone repository
git clone https://github.com/spress/Spress.git
. - Get vendors
- Create a blank site.
- Build your site.
Use Composer to get vendors:
$ cd your-path
$ composer.phar update
Spress command are located in bin/spress
and you can use this command to create a new site or process your
site.
Build your site in your configured destination, typically _site
.
site:Build [-s|--source="./"] [--timezone="..."] [--env="dev"]
[--server] [--watch] [--drafts]
[--safe]
--server
The built-in server will run.--watch
Watch for changes and regenerate your site automatically.--drafts
To include draft posts in the generated site.--safe
Disable all plugins.
E.g $ spress site:build -s /your-site-dir
- To create
config_prod.yml
with the options that will be overrided inconfig.yml
. $ spress site:build --env=prod
Create a new site.
new:site [path="./"] [template="blank"] [--force] [--all]
--force
option force to use the path even though exists and it's not empty.--all
In blank template, creates the complete scaffold.
E.g $ spress new:site /your-site-dir
The new:post
command helps you generates new posts.
By default, the command interacts with the developer to tweak the generation.
Any passed option will be used as a default value for the interaction.
new:post [--title="..."] [--layout="default"] [--date="..."]
[--tags="..."] [--categories="..."]`
--title
: The title of the post.--layout
: The layout of the post.--date
: The date assigned to the post.--tags
: Comma separated list of tags.--categories
: Comma separated list of categories.
The new:plugin
command helps you generates new plugins.
By default, the command interacts with the developer to tweak the generation.
Any passed option will be used as a default value for the interaction.
new:plugin [--name="..."] [--command-name="..."] [--command-description="..."]
[--command-help="..."] [--author="..."] [--email="..."]
[--description="..."] [--license="MIT"]
--name
: The name of the plugins should follow the patternvendor-name/plugin-name
.--command-name
: In case of you want to create a command plugin this is the name of the command.--command-description
: The description of command in case of command plugin.--command-help
: The description of command in case of command plugin.--author
: The author of the plugin.--email
: The Email of the author.--description
: The description of your plugin.--license
: The license under you publish your plugin. MIT by default.
self-update
or selfupdate
command replace your spress.phar
by the
latest version from spress.yosymfony.com.
We are using Box Project for generating the .phar
file.
You may download Box:
$ curl -LSs https://box-project.github.io/box2/installer.php | php
Next:
$ cd spress-folder
$ box build
You can run the unit tests with the following command:
$ cd your-path
$ composer.phar install
$ phpunit