PHP Static site generator

Overview

Spress - PHP Static site generator

Build Status Build status SensioLabsInsight

Spress is a static site generator built with Symfony components.

License: MIT.

Requirements

  • Linux, Unix, Mac OS X or Windows.
  • PHP +7.4.
  • Composer.

Community

Discuss and share your opinions in Gitter chat:

Gitter

Contributing

When Contributing code to Spress, you must follow its coding standards. Spress follows PSR-2 coding style.

Keep in mind the golden rule: Imitate the existing Spress code.

Pull Requests

  • Fork the Spress repository.
  • Create a new branch for each feature or improvement.
  • New features: Send a pull request from each feature branch to master branch.
  • Fixes: Send a pull request to 2.1 branch.

Unit testing

All pull requests must be accompanied by passing unit tests. Spress uses phpunit for testing.

How to make spress.phar

We are using Box Project for generating the .phar file.

$ cd spress
$ box build

Unit tests

You can run the unit tests with the following command:

$ cd spress
$ composer test
Comments
  • "Getting started" for Windows: `spress.cmd` error

    In the "Getting started" page (http://spress.yosymfony.com/docs/getting-started/) it says:

    5. Create a wrapping batch script (results in C:\bin\spress.cmd):
    
          C:\Users\username> cd C:\bin
          C:\bin> echo @php "%~dp0spress.phar" %* > spress.cmd
          C:\bin> exit
    

    the line echo @php "%~dp0spress.phar" %* > spress.cmd is wrong: it should have %%* instead of %*, otherwise the variable gets expanded (to an empty string) during echo and is omitted in the final spress.cmd file — which prevents the spress cmd from passing on additional parameters!

    Also, for the same reasons, it would be best to add an % before %~dp0spress.phar, so that even the script path isn't expanded (to the script literal path) during echo, which would allow to create a spress.cmd file that works even if moved around after creation.

    Therefore, the whole line should be changed to:

    C:\bin> echo @php "%%~dp0spress.phar" %%* > spress.cmd
    
    opened by tajmone 8
  • Move pages source into a

    Move pages source into a "_pages" directory

    The root folder can contain other files or folders (README, LICENSE, assets preprocessors) without taking care about exclude patterns on configuration file.

    Optionally, the '_' in all folders can be suppresed: special cases are not longer needed.

    spress-pages .

    Enhancement BC Break 
    opened by ocubom 8
  • Truncated title_path/permalinks

    Truncated title_path/permalinks

    I'm having a little issue with the way title_path is being constructed, because I happen to use dots in some of my post titles. E.g. imagine a post made from a file spress-2.1.1-released.md it would get a title_path spress-2.1.1-released However, if there's a date, e.g. 2016-02-02-spress-2.1.1-released.md then the title_path generated would be spress-2-1

    The most obvious issue is that it's missing the end, I believe because FilesystemDataSource (in isDateFilename) tries to account for "double extension" I guess, like foo.html.twig or something. But this is obviously causing issues here. I'm not sure how to (best) fix this, I've simply removed the "double extension" support from the regex right now, but maybe this should be based on an option? Unless there's a known list of such possible "double extension" to use?

    Another issue is that the dots are turned into dashes, which doesn't seem to happen when no date is used. This isn't very consistent, and since we're talking about it I'd rather have dots remain as is, so from 2016-02-02-spress-2.1.1-released.md the title_path would be spress-2.1.1-released

    Bug 
    opened by jjk-jacky 7
  • Two posts with the same date

    Two posts with the same date

    I have two posts with the same date:

    2015-09-29-naming-rrq.md
    2015-09-29-naming-rsh.md
    

    The generated output only has one entry under article/page/2015/09/29index.html

    What is this problem?

    opened by taylorren 6
  • Renderizer error with min files

    Renderizer error with min files

    I am trying to migrate my page from Spress 1.x to 2.x

    But when I try add assets css and js minified files produce and error with Renderizer, I resolve unminified some css files but I still get and error with Modernizer js (2.7.1) library event that it's not minified.

    This the error I get when I try to build my site.

    [Yosymfony\Spress\Core\ContentManager\Renderizer\Exception\RenderException]
      Error during lexing or parsing of a template in "assets\/js\/vendor\/modernizr-2.7.1.custom.min.js".
    
    
    
      [Twig_Error_Syntax]
      Unclosed comment in "@dynamic/content" at line 77.
    
    opened by enzolutions 5
  • Server option ignore configuration URL

    Server option ignore configuration URL

    When I try to run spress with server option I got a server always in port 4000 and host 0.0.0.0 ignoring the config variable URL

    below a sample of the output

    spress site:build --server
    Starting...
    Environment: dev.
    Total posts: 17
    Processed posts: 16
    Drafts post: 1
    Total pages: 142
    Processed pages: 20
    Other resources: 83
    
    Spress server running... press ctrl-c to stop
    Port: 4000 Host: 0.0.0.0 Document root: /Users/enzo/www/enzolutions.github.io/_site
    
    opened by enzolutions 5
  • Added ability to use multiple extensions on layouts.

    Added ability to use multiple extensions on layouts.

    Currently layout files are hard-coded to use the '.html' file extension. This change will allow the end-user to specify an array of extensions that are acceptable.

    opened by kieldoyle 5
  • /:basename permalink variable contains .html when using *.html.twig

    /:basename permalink variable contains .html when using *.html.twig

    Expected behavior

    Spress should generate: index.html, about.html ...

    Actual behavior

    Spress generates index.html.html, about.html.html ...

    Steps to reproduce the behavior

    1. make sure all layouts and pages have .html.twig extension
    2. add permalink: /:path/:basename.:extension in config.yml

    Environment information

    Spress Version: 2.1.0

    Probable cause

    The /:basename permalink variable contains .html when using the map_converter_extension feature introduced in Spress v2.1.0

    Bug 
    opened by KristiyanHristov 4
  • Using spress anywhere on command line

    Using spress anywhere on command line

    Hi,

    Just wondering how to use spress from the command line like the laravel command. Does anyone know how to do that? If I copy /bin/spress to /usr/local/bin/ and type spress in the command line it asks me to run composer update first, but that doesn't work in the new location.

    Regards, Joren

    opened by jorenmartijn 4
  • Items in collections should be ordered

    Items in collections should be ordered

    Currently items in a collection aren't in any given order, which basically means they're "useless" since they're pretty much in a random order. For example, if one tries to loop over them to make an RSS feed, via e.g:

    for post in site.posts
    

    It won't give proper results, since again there's no order. I'm not really familiar with Spress codebase so I'm not sure on the "how" but I believe this could be addressed in ContentManager->process(), after looping over $items and before looping over $itemsGenerator, it should be possible to loop over $this->itemsByCollection, and then apply a default order which could be set from config, e.g:

    collections:
        posts:
            sort_by: date
        projects:
            sort_by: title
            sort_type: ascending
    

    Of course it also means this default sort order will be of use in generators, though it'll still be possible to define a custom sort order alongside a generator, as is the case today.

    Additionally, I'd also like it a lot if, after this default sorting, all items could get attributes referring to the previous & next items in the collection (as per this default sort order). That way, when generating the page for one item in a collection, it'd be possible to have links to the previous and/or next item in said collection.

    This might not be as necessary to make items usable, but it'd be nice to have; and I won't lie, I'm needing this to convert a site from jekyll to Spress, so yeah.

    opened by jjk-jacky 4
  • Basic Error

    Basic Error

    Hi There

    This is the error I get when creating a new site. Any help would be appreciated. /usr/local/bin/spress: line 1: syntax error near unexpected token `<' /usr/local/bin/spress: line 1: 'You are being redirected'

    opened by ghost 4
  • Bump twig/twig from 3.0.3 to 3.4.3

    Bump twig/twig from 3.0.3 to 3.4.3

    Bumps twig/twig from 3.0.3 to 3.4.3.

    Changelog

    Sourced from twig/twig's changelog.

    3.4.3 (2022-09-28)

    • Fix a security issue on filesystem loader (possibility to load a template outside a configured directory)

    3.4.2 (2022-08-12)

    • Allow inherited magic method to still run with calling class
    • Fix CallExpression::reflectCallable() throwing TypeError
    • Fix typo in naming (currency_code)

    3.4.1 (2022-05-17)

    • Fix optimizing non-public named closures

    3.4.0 (2022-05-22)

    • Add support for named closures

    3.3.10 (2022-04-06)

    • Enable bytecode invalidation when auto_reload is enabled

    3.3.9 (2022-03-25)

    • Fix custom escapers when using multiple Twig environments
    • Add support for "constant('class', object)"
    • Do not reuse internally generated variable names during parsing

    3.3.8 (2022-02-04)

    • Fix a security issue when in a sandbox: the sort filter must require a Closure for the arrow parameter
    • Fix deprecation notice on round
    • Fix call to deprecated convertToHtml method

    3.3.7 (2022-01-03)

    • Allow more null support when Twig expects a string (for better 8.1 support)
    • Only use Commonmark extensions if markdown enabled

    3.3.6 (2022-01-03)

    • Only use Commonmark extensions if markdown enabled

    3.3.5 (2022-01-03)

    • Allow CommonMark extensions to easily be added
    • Allow null when Twig expects a string (for better 8.1 support)
    • Make some performance optimizations
    • Allow Symfony translation contract v3+

    ... (truncated)

    Commits
    • c38fd6b Prepare the 3.4.3 release
    • 5a858ac Merge branch '2.x' into 3.x
    • ab40267 Prepare the 2.15.3 release
    • fc18c2e Update CHANGELOG
    • 2e8acd9 Merge branch '2.x' into 3.x
    • d6ea14a Merge branch '1.x' into 2.x
    • 35f3035 security #cve- Fix a security issue on filesystem loader (possibility to load...
    • be33323 Merge branch '2.x' into 3.x
    • 9170edf Fix doc CS
    • fab3e0f minor #3744 Adding installation instructions for Symfony (ThomasLandauer)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump composer/composer from 1.10.5 to 1.10.26

    Bump composer/composer from 1.10.5 to 1.10.26

    Bumps composer/composer from 1.10.5 to 1.10.26.

    Release notes

    Sourced from composer/composer's releases.

    1.10.26

    • Security: Fixed command injection vulnerability in HgDriver/GitDriver (GHSA-x7cr-6qr6-2hh6 / CVE-2022-24828)

    1.10.25

    • Fixed selfupdate on Windows + PHP 8.1 regression (#10446)

    1.10.24

    1.10.23

    • Security: Fixed command injection vulnerability on Windows (GHSA-frqg-7g38-6gcf / CVE-2021-41116)

    1.10.22

    • Security: Fixed command injection vulnerability in HgDriver/HgDownloader and hardened other VCS drivers and downloaders (GHSA-h5h8-pc6h-jvvx / CVE-2021-29472)

    1.10.21

    • Fixed support for new GitHub OAuth token format
    • Fixed processes silently ignoring the CWD when it does not exist

    1.10.20

    • Fixed exclude-from-classmap causing regex issues when having too many paths
    • Fixed compatibility issue with Symfony 4/5

    1.10.19

    • Fixed regression on PHP 8.0

    1.10.18

    • Allow installation on PHP 8.0

    1.10.17

    • Fixed Bitbucket API authentication issue
    • Fixed parsing of Composer 2 lock files breaking in some rare conditions

    1.10.16

    • Added warning to validate command for cases where packages provide/replace a package that they also require
    • Fixed JSON schema validation issue with PHPStorm
    • Fixed symlink handling in archive command

    1.10.15

    • Fixed path repo version guessing issue

    1.10.14

    • Fixed version guesser to look at remote branches as well as local ones
    • Fixed path repositories version guessing to handle edge cases where version is different from the VCS-guessed version
    • Fixed COMPOSER env var causing issues when combined with the global command
    • Fixed a few issues dealing with PHP without openssl extension (not recommended at all but sometimes needed for testing)

    ... (truncated)

    Changelog

    Sourced from composer/composer's changelog.

    [1.10.26] 2022-04-13

    • Security: Fixed command injection vulnerability in HgDriver/GitDriver (GHSA-x7cr-6qr6-2hh6 / CVE-2022-24828)

    [1.10.25] 2022-01-21

    • Fixed selfupdate on Windows + PHP 8.1 regression (#10446)

    [1.10.24] 2021-12-09

    [1.10.23] 2021-10-05

    • Security: Fixed command injection vulnerability on Windows (GHSA-frqg-7g38-6gcf / CVE-2021-41116)

    [1.10.22] 2021-04-27

    • Security: Fixed command injection vulnerability in HgDriver/HgDownloader and hardened other VCS drivers and downloaders (GHSA-h5h8-pc6h-jvvx / CVE-2021-29472)

    [1.10.21] 2021-04-01

    • Fixed support for new GitHub OAuth token format
    • Fixed processes silently ignoring the CWD when it does not exist

    [1.10.20] 2021-01-27

    • Fixed exclude-from-classmap causing regex issues when having too many paths
    • Fixed compatibility issue with Symfony 4/5

    [1.10.19] 2020-12-04

    • Fixed regression on PHP 8.0

    [1.10.18] 2020-12-03

    • Allow installation on PHP 8.0

    [1.10.17] 2020-10-30

    • Fixed Bitbucket API authentication issue
    • Fixed parsing of Composer 2 lock files breaking in some rare conditions

    [1.10.16] 2020-10-24

    • Added warning to validate command for cases where packages provide/replace a package that they also require
    • Fixed JSON schema validation issue with PHPStorm
    • Fixed symlink handling in archive command

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Throw exception if Phar not installed

    Throw exception if Phar not installed

    With Couscous:

    https://github.com/CouscousPHP/Couscous

    if Phar is not installed you get this:

    The "phar" extension is required to run this archive.
    

    but with Spress you get nothing. I checked the code and here is the difference:

    if (class_exists('Phar')) {
       $include = 'phar://' . __FILE__;
       Phar::mapPhar('couscous.phar');
    } else {
       throw new Exception('The "phar" extension is required to run this archive.');
    }
    
    if (class_exists('Phar')) {
       Phar::mapPhar('spress.phar');
       require 'phar://' . __FILE__ . '/bin/spress';
    }
    
    opened by ghost 2
  • new:site with Composer install

    new:site with Composer install

    Issue

    Hi there! I'm testing Spress as a replacement for my docs site. I'd like for the entire site and its tools to live in one directory, with the tools managed by Composer. The issue is that spress site:new will not work in the same directory it's installed in.

    Steps to reproduce

    1. In a new directory, install Spress with Composer:
    $ mkdir spress
    $ cd spress
    $ composer require spress/spress
    Using version ^2.2 for spress/spress
    ./composer.json has been updated
    Loading composer repositories with package information
    Updating dependencies (including require-dev)
    Package operations: 43 installs, 0 updates, 0 removals
     ...
    paragonie/random_compat suggests installing ext-libsodium (Provides a modern crypto API that can be used to generate random bytes.)
    symfony/event-dispatcher suggests installing symfony/dependency-injection ()
    symfony/http-kernel suggests installing symfony/browser-kit ()
    symfony/http-kernel suggests installing symfony/dependency-injection ()
    symfony/http-kernel suggests installing symfony/var-dumper ()
    react/event-loop suggests installing ext-libevent (>=0.1.0)
    react/event-loop suggests installing ext-event (~1.0)
    react/event-loop suggests installing ext-libev (*)
    yosymfony/config-loader suggests installing yosymfony/toml (0.3.*)
    Writing lock file
    Generating autoload files
    
    1. Attempt to init a new site:
    $ vendor/bin/spress new:site
    
    Generating a site using the theme: "blank"...
    
                                          
      [RuntimeException]                  
      Path "./" exists and is not empty.  
                                          
    
    new:site [--force] [--all] [--prefer-source] [--prefer-lock] [--no-scripts] [--] [<path>] [<theme>]
    
    1. Attempt to override:
    $ vendor/bin/spress new:site --force .
    
    Generating a site using the theme: "blank"...
    PHP Fatal error:  Uncaught Error: Class 'Symfony\Component\Debug\Exception\FatalThrowableError' not found in /home/alex/repos/spress/vendor/symfony/console/Application.php:129
    Stack trace:
    #0 /home/alex/repos/spress/vendor/spress/spress/bin/spress(61): Symfony\Component\Console\Application->run()
    #1 {main}
      thrown in /home/alex/repos/spress/vendor/symfony/console/Application.php on line 129
    
    Fatal error: Uncaught Error: Class 'Symfony\Component\Debug\Exception\FatalThrowableError' not found in /home/alex/repos/spress/vendor/symfony/console/Application.php:129
    Stack trace:
    #0 /home/alex/repos/spress/vendor/spress/spress/bin/spress(61): Symfony\Component\Console\Application->run()
    #1 {main}
      thrown in /home/alex/repos/spress/vendor/symfony/console/Application.php on line 129
    

    This error seems to be caused by --force deleting the contents of the directory.

    Suggested Resolution

    For now I can continue testing by initializing the site into a site subdirectory, but I think a better solution would be for new:site to ignore vendor, composer.json, and composer.lock.

    opened by alexfornuto 2
  • [Proposal] Incremental regeneration

    [Proposal] Incremental regeneration

    Incremental regeneration helps shorten build times by only generating pages that were updated since the previous build. This first approach will be very simple and only regenerate a page if this one is changed.

    Incremental regeneration can be enabled via the --incremental option in site:build command or by setting incremental: true in the configuration file of a site.

    CLI examples:

    spress site:build --incremental
    spress site:build --server --incremental
    spress site:build --server --watch --incremental
    

    There will be a file called .metadata at the site root for keeping track of both file modification times and inter-document dependencies.

    Limitations

    • The config.yml file is excluded on this mode.
    • The generators are excluded on this mode.

    Tasks

    • [x] Save and read site metadata from a file called spress.metadata placed at site root.
    • [ ] Manage the dependencies of an item (page) only considering the layout used by it.
    • [ ] Modify the class FilesystemDataSource to recover only the modified files when the incremental mode is on.

    Deal with: #97.

    New feature 
    opened by yosymfony 0
Releases(v3.0.0)
  • v3.0.0(Apr 30, 2020)

    What's new in this release?

    • [New] Fixed the PHP minimum version to 7.4 in composer.json file.
    • [New] Added the supporting class Filesystem. It is an extension of Symfony Filesystem component with a method for reading the content of files.
    • [Improved] Updated Symfony components to 4.4.
    • [Improved] Updated Twig to 3.0.
    • [Improved] Updated "michelf/php-markdown" to 1.9.
    • [New] Added class DependencyResolver, a simple dependency resolver. It is useful for keeping tracks of inter-document dependencies.
    • [Deleted] The configuration option layout_ext is not necessary anymore. Now, the option text_extensions is used to recognize layouts files.
    • [Improved] The class FilesystemDataSource returns layout item identifiers without file extensions when they are unique. In case of name collision, the filename extension will be added.
    • [Fixed] Now, Appveyor CI installs PHP and Composer using Chocolatey package system.
    Source code(tar.gz)
    Source code(zip)
    spress.phar(7.37 MB)
    spress.zip(4.36 MB)
  • v2.2.0(May 7, 2017)

    What's new in this release?

    • [New] Dropped the support for PHP 5.5. The minimum version now is 5.6.
    • [Fixed] The Spress-installer plugin is included in the composer.json file when a new blank theme is created.
    • [Fixed] Fixed an issue when loading layouts and includes of the current theme.
    • [Fixed] Fixed an issue related with the presedence between the theme's assets and the site's assets.
    • [Fixed] Bug #107 fixed: ".htaccess not being included in build".
    • [Fixed] Fixed an issue related to the convertion to array of a Finder class in FilesystemDataSource class.
    • [Improved] Updated PluginManagerBuilder class with support for loading several plugins from extra->spress_class attribute of a plugin's composer.json file.
    • [Improved] Renamed some tests with a more descritive name.
    • [Improved] Fixed some descriptions in commands.
    • [Improved] Replaced the use of PHPUnit_Framework_TestCase class by TestCase.
    • [Improved] Deleted the .htaccess value from include key of configuration files due to the fix #107.
    • [New] Support for themes. See the new feature #98.
    • [New] Package manager with the following new commands: new:theme, add:plugin, remove:plugin and update:plugin. Additionaly, new:site command has been updated for scaffolding new sites using themes. See the new feature #96.
    • [New] Allow default attributes on "pages" collection. See new feature #93.
    • [New] New options for applying avoid_renderizer feature to type of files and files belong to a path (relative to src/content folder). See new feature #91.
    • [New] Added a verbosity level param (optional) to the write method of IOInterface.
    • [New] Added verbosity and very-verbosity level messages to the ContentManager class.
    • [New] Added support for overwriting messages to the output in IOInterface.
    • [New] Added support for ask choice questions in IOInterface.
    • [New] Added the method getSpress to CommandEnvironmentInterface.
    • [New] Updated to using Symfony 3.2 components.
    • [Improved] The terms generated by TaxonomyGenerator for each item appears sorted.
    • [Fixed] Avoid an error using --force option of new:site command over a non-empty directory that contains "hidden" directories and files.
    • [Fixed] Fixed a bug related with the "pagination generator" and the draft posts. See bug #101.
    • [Fixed] Fixed the askAndHideAnswer method of ConsoleIO class to use the fallback argument.
    Source code(tar.gz)
    Source code(zip)
    spress.phar(6.81 MB)
    spress.zip(5.35 MB)
  • v2.2.0-rc(Jan 15, 2017)

    What's new in this release?

    • [New] Support for themes. See the new feature #98.
    • [New] Package manager with the following new commands: new:theme, add:plugin, remove:plugin and update:plugin. Additionaly, new:site command has been updated for scaffolding new sites using themes. See the new feature #96.
    • [New] Allow default attributes on "pages" collection. See new feature #93.
    • [New] New options for applying avoid_renderizer feature to type of files and files belong to a path (relative to src/content folder). See new feature #91.
    • [New] Added a verbosity level param (optional) to the write method of IOInterface.
    • [New] Added verbosity and very-verbosity level messages to the ContentManager class.
    • [New] Added support for overwriting messages to the output in IOInterface.
    • [New] Added support for ask choice questions in IOInterface.
    • [New] Added the method getSpress to CommandEnvironmentInterface.
    • [New] Updated to using Symfony 3.2 components.
    • [Improved] The terms generated by TaxonomyGenerator for each item appears sorted.
    • [Fixed] Avoid an error using --force option of new:site command over a non-empty directory that contains "hidden" directories and files.
    • [Fixed] Fixed a bug related with the "pagination generator" and the draft posts. See bug #101.
    • [Fixed] Fixed the askAndHideAnswer method of ConsoleIO class to use the fallback argument.
    Source code(tar.gz)
    Source code(zip)
    spress.phar(6.52 MB)
  • v2.1.3(Jul 3, 2016)

    What's new in this release?

    • [New] Class FileInfo has been added to the support classes set of the core.
    • [New] New configuration value aimed to plugin manager builder for excluding directories in the disconvering class phase. Useful to avoid scaning test classes.
    • [Fixed] Fixed the truncated title_path attribute when the filename contains dots before the extension. More details in bug #88.
    • [Fixed] The value of title_path is not altered when it is parsed by FilesystemDataSource class. More details in bug #88.
    • [Fixed] If you set preserve_path_title attribute to true you will get the title parsed from the filename as-is (without the date part). Only rawurlencode function is applied. See PR #90.
    Source code(tar.gz)
    Source code(zip)
    spress.phar(5.66 MB)
    spress.zip(4.92 MB)
  • v2.1.2(May 22, 2016)

    What's new in this release?

    • [New] Two new methods have been added to StringWrapper class: lower and upper.
    • [Fixed] Bug #80 has been fixed: "Composer install fails if no namespace is specified in new plugin". See PR #81.
    • [Fixed] Bug #82 has been fixed: "Substr '---' in yaml string cause builder crash".
    • [Fixed] Bug #83 has been fixed: "Same tags on different languages cause builder crash".
    Source code(tar.gz)
    Source code(zip)
    spress.phar(5.60 MB)
    spress.zip(4.87 MB)
  • v2.1.1(Apr 12, 2016)

    What's new in this release?

    • [Fixed] Bug #78 has been fixed: "/:basename permalink variable contains .html when using *.html.twig".
    • [Fixed] Bug #79 has been fixed: "Error loading plugin's dependencies with -s option at site:build command".
    • [Improved] Clarified the message when site:build command is invoked against a non Spress site folder.
    Source code(tar.gz)
    Source code(zip)
    spress.phar(5.19 MB)
    spress.zip(4.73 MB)
  • v2.1.0(Mar 26, 2016)

    What's new in this release?

    • [New] Support for calling to an existing command inside a command plugin. The CommandEnvironmentInterface interface has been added and CommandPluginInterface has been updated with setCommandEnvironment and getCommandEnvironment methods. See feature #77.
    • [New] Sort items of a collection. See feature #67.
    • [New] Support to extends TwigRenderizer with tags. See PR #65.
    • [New] Each item of a sorted collection has next and prior relationships. At compile time, you have access to these through page.relationships.next and page.relationships.prior variables. See feature #69.
    • [New] Relationship collection for items. A new class has been added: RelationshipCollection. A new method getRelationshipCollection has been added to ItemIterface.
    • [New] MirrorConverter class has been replaced by MapConverter. See feature #73. Fixed ticket: #28 "Support .twig extention".
    • [New] Added ItemCollection class to Core support classes.
    • [New] Added getCollections method in CollectionManager class.
    • [New] Added clearConverter and countConverter methods in ConverterManager class.
    • [Improved] Improved permalinks customizations. See PR #64.
    • [Improved] Eliminated unnecessary calls to setItem method of SiteAttribute class in ContentManager class.
    • [Improved] The methods for managing the collection of plugins in PluginManager class have been moved to a Collection class.
    • [Improved] The methods for managing the collection of collection-item in CollectionManager class have been moved to a Collection class.
    • [Improved] Clarified the error message in case of denied permissions when renaming the temporal file in SelfUpdateCommand class.
    • [Fixed] Fixed the path available at page.path variable. Prior to this version, this variable contains the relative path to src/content/ but with the filename extension changed by the Converter. Now, the original filename extension isn't altered. A new path snapshot has been created in ItemIterface.
    Source code(tar.gz)
    Source code(zip)
    spress.phar(5.15 MB)
    spress.zip(5.64 MB)
  • v2.0.2(Jan 16, 2016)

    What's new in this release?

    • [New] PluginTester class has been added to the core for testing plugins easily.
    • [Fixed] Fixed an issue with the content retrieved by after_render_page event.
    • [Fixed] A constant name of ItemInterface has been changed: SNAPSHOT_AFTER_PAGE -> SNAPSHOT_AFTER_RENDER_PAGE.
    Source code(tar.gz)
    Source code(zip)
    spress.phar(4.96 MB)
    spress.zip(5.41 MB)
  • v2.0.1(Jan 9, 2016)

    What's new in this release?

    • [Improved] Normalized the directory separator to '/' irrespective of the operating system.
    • [Fixed] Fixed the file's extension twig.html in configuration files.
    • [Fixed] Fixed the exception "A previous item exists with the same id" thrown by Taxonomy generator due to a key sensitive issue. A normalize method has been added. e.g: "news", "NEWS", " News " are the same term: "news".
    • [Fixed] Fixed the namespace of AttributeValueException at PaginationGenerator class.
    Source code(tar.gz)
    Source code(zip)
    spress.phar(4.93 MB)
    spress.zip(5.25 MB)
  • v2.0.0(Jan 2, 2016)

    What's new in this release?

    • [New] ConsoleIO class uses Symfony CLI styles.
    • [Improved] 100% tests passed in HHVM.
    • [Fixed] Renamed the package name yosymfony/spress-installer to spress/spress-installer.
    • [Fixed] Fixed a race condition with the url attribute of items before dispatch spress.before_render_blocks event.
    • [Fixed] Questions made by commands are using ConsoleIO methods.
    • [Fixed] Fixed a bug with the built-in server by which a relative URL that contains a dot inside the trailing component throws a 404 not found error. e.g: /doc/2.0.
    • [Fixed] Added a default value for $fallback argument of askHiddenResponseAndValidate and askAndHideAnswer methods in IOInterface.
    Source code(tar.gz)
    Source code(zip)
    spress.phar(4.92 MB)
    spress.zip(5.28 MB)
  • v2.0.0-rc(Dec 7, 2015)

    What's new in this release?

    • [New] Added MemoryDataSource, a datasource for generating dynamic content.
    • [New] Support to sort items at PaginationGenerator with attributes sort_by and `sort_type. See #61.
    • [New] Added getGeneratorManager method to EnvironmentEvent for managing generators at plugins.
    • [Improved] Improved the way of generating the classname in PluginGenerator.
    • [Improved] Minor changes over output styles.
    • [Improved] Improved HttpServer with support to load internal resources (used with error page). Added a new hook: handleOnAfterRequestFunction. Bootstrap file has been included for using with internal pages like error page.
    • [Improved] Minor improvements over the Spress application output.
    • [Fixed] Now, slug method transform dot characters into dash characters.
    • [Fixed] Fixed lifecycle: render phase starts after converter phase has been finished for all items.
    • [Fixed] Changed the method remove by removeCollection in CollectionManager class.
    • [Fixed] PermalinkGenerator adds an initial slash if the permalink doesn't start with it.
    • [Fixed] MissingAttributeException and AttributeValueException has been moved to `Core\ContentManager\Exception.
    • [Fixed] ConsoleIO passed to spress.io key (DI container) when SiteBuildCommand builds `Spress instance.
    • [Fixed] Updated spress-installer version to ~2.0 at composer.json.twig.
    • [Fixed] Fixed the message of the exception threw when a previous item exists.
    • [Deleted] ConfigValueException has been deleted.
    Source code(tar.gz)
    Source code(zip)
    spress.phar(4.92 MB)
    spress.zip(3.53 MB)
  • v2.0.0-beta(Oct 15, 2015)

    What's new in this release?

    • [New] Added a new converter for Markdown: ParsedownConverter. This converter is based on Parsedown by Emanuil Rusev. See http://parsedown.org/. Deals with issue #40.
    • [New] Added command plugins: a new kind of plugins witch provides subcommand for spress executable. See #56.
    • [New] Added self-update command with an alias selfupdate for keeping Spress up to date. See #60.
    • [New] Taxonomy generator for grouping content around a set of terms. See #57.
    • [New] Modified RenderizerInterface for throwing a Yosymfony\Spress\Core\ContentManager\Renderizer\Exception\RenderException if an error occurred during redering the content. Method affected: renderBlocks and renderPage.
    • [New] Added a new special attributte avoid_renderizer for avoiding the renderizer phase over an item.
    • [Improved] Additional autoload only be processed if exists a composer.json file in the root of the site folder.
    • [Fix] The separator for tags and categories of new:post command has been changed from space to comma. See issue #51.
    • [Fix] New template for spress plugin scaffold (new:plugin command) - fixed for 2.0 release. See issue #55.
    • [Fix] The setUp method of FilesystemDataWriter removes the whole content of the output dir but VCS files. This means thatsite:build` command doesn't remove the VCS files.
    • [Deleted] Deleted the site:new alias for command new:site.
    Source code(tar.gz)
    Source code(zip)
    spress.phar(4.75 MB)
    spress.zip(4.32 MB)
  • v2.0.0-alpha(Aug 12, 2015)

    What's new in this release?

    • [New] Data-sources: (issue #46) data sources can load site data from certain locations like filesystem or database.
    • [New] Site structure (issue #41).
    • [New] Data-writer (issue #44): The DataWriter's responsibility is to persist the content of the items.
    • [New] Collections (issue #43): collections allow you to define a new type of document like page or post.
    • [New] Generators (issue #45): Generators are used for generating new items of content.
    • [New] These events "spress.before_convert", "spress.after_convert" receive a ContentEvent as an argument.
    • [New] Renderizer (issue #48): Renderizer are responsible for formatting content.
    • [New] List of new events: spress.before_render_blocks, spress.after_render_blocks, spress.before_render_page, spress.after_render_page. See #49.
    • [New] Established PHP 5.5 as minimum version (see #42).
    • [New] List of new configuration attributes: "text_extensions", "attribute_syntax", "preserve_path_title", "collections", "data_sources".
    • [Improved] Updated Symfony componentes to 2.7.
    • [Improved] Updated Markdown parser (michelf/php-markdown) from Michel Fortin.
    • [Improved] Updated built-in theme Spresso to 2.0.
    • [Deleted] Methods initialize and getSupportExtension of ConverterInterface have been deleted.
    • [Deleted] TemplateManager class of plugin API.
    • [Deleted] EnviromentEvent class.
    • [Deleted] List of deleted events: spress.after_convert_posts, spress.before_render_pagination, spress.after_render_pagination, spress.before_render, spress.after_render. See #49.
    • [Deleted] List of configuration attributes (config.yml) deleted because they have been marked as deprecated: baseurl, paginate, paginate_path, limit_posts, processable_ext, destination, posts, includes, layouts, plugins.
    Source code(tar.gz)
    Source code(zip)
    spress.phar(4.59 MB)
    spress.zip(4.18 MB)
  • v1.1.1(Feb 25, 2015)

  • v1.1.0(Jan 8, 2015)

    What's new in Spress 1.1.0

    • [Improved] Support for exceptions during parsing a site with --server and --watch options.
    • [Improved] config.yml is reloaded when rebuilding a site with watch mode enabled.
    • [Improved] Symfony components updated to 2.6.
    • [Improved] Spresso theme updated to 1.1.
    • [Fixed] Bug #30: Adding source parameter to config appears to not do anything.
    Source code(tar.gz)
    Source code(zip)
    spress.phar(4.19 MB)
    spress.zip(2.65 MB)
  • v1.1.0-rc.1(Dec 22, 2014)

    What's new in Spress 1.1.0-rc?

    • [New] variable: server_watch_ext at global configuration.
    • [Fixed] Default value for layout at new:post command assigned to null.
    • [Fixed] Fixed questions for tags and categories in new:post command.
    • [Fixed] Fixed new:post help message.
    • [Fixed] Added validators for command options.
    • [Improved] Performance of combination --server and --watch options improved.
    • [Improved] Deleted unused variables.
    Source code(tar.gz)
    Source code(zip)
  • v1.1.0-beta.2(Nov 21, 2014)

    What's new in Spress 1.1.0-beta.2

    • [New] Issue #17: Twig debug mode through configuration.
    • [New] Two new scaffolding commands: new:post and new:plugin.
    • [New] Proposal #22: Namespace new in commands for creating stuff.
    • [Deprecated] The command site:new has been declared deprecated and replaced by new:site.
    Source code(tar.gz)
    Source code(zip)
  • v1.1.0-beta.1(Oct 19, 2014)

    What's new in Spress 1.1.0

    • [New] IO API useful for interacting with the users.
    • [New] Proposal #9: Support for environment configuration files. New key env for config.yml.
    • [New] PR #12: Added ability to use multiple extensions on layouts.
    • [New] Proposal #15: Built-in server and watch for changes.
    • [Fixed] Issue #10: Classname with typo: EnviromentEvent. This class was replaced by EnvironmentEvent.
    • [Fixed] PR #14: Changed Frontmatter regex pattern to allow for CRLF line endings.
    • [Improved] Proposal #13: Split Spress into Spress Core and its ecosystem.
    • [Improved] Replaces all uses of deprecated method mergeWith from ConfigServiceProvider by union method.
    • [Improved] Proposal #11: Improve the plugins manager for writing plugins more easily.
    • [Improved] Decoupled options for Plugin Manager.
    • [Improved] PSR-4 for classloader.
    • [Improved] Symfony components >= 2.4 and < 3 in composer.json.
    • [Improved] The default value for url key at global configuration is empty-string.
    • [Improved] Documentation fixes.
    • [Deprecated] The configuration options: baseurl and relative_permalinks has been declared deprecated.
    Source code(tar.gz)
    Source code(zip)
  • v1.0.3(May 22, 2014)

  • v1.0.2(Mar 30, 2014)

    What's new in this release?

    • [Fixed] Bug #6: Twig tags not rendered in posts located at variable site.posts.
    • [Fixed] Bug #6 with variables site.categories and site.tags.
    • [Improved] Variables site.categories and site.tags have page-identifier as index of array.
    • [Improved] Base implementation of ContentItemInterface created at ContentItem. The classes PageItem and PostItem extend from this.
    Source code(tar.gz)
    Source code(zip)
    spress.zip(2.54 MB)
  • v1.0.1(Mar 8, 2014)

    What's new in this release?

    • [New] events related with pagination phase (issue #3): spress.before_render_pagination and spress.after_render_pagination.
    • [Fixed] the class loader path when Spress is installed as package.
    • [Improved] Payload argument of Render method (plugins TemplateManager) is optional.
    • [Fixed] bug #4: UrlGenerator always has ending slash.
    • [Improved] pagination phase of posts.
    Source code(tar.gz)
    Source code(zip)
    spress.zip(2.51 MB)
  • v1.0.0(Feb 5, 2014)

  • v1.0.0-rc.3(Jan 12, 2014)

    What's new in this release?

    • Improved the search of folders that starting with underscore.
    • Support to composer for spress site plugins.
    • Install themes with Composer.
    • Deleted Spresso theme. Now is a package.
    • Generate composer.json in a blank site.
    • Fixed the documentation.
    Source code(tar.gz)
    Source code(zip)
  • v1.0.0-rc.2(Dec 28, 2013)

    What's new in this release?

    • The value of site.url is the original from global config.yml.
    • Fixed Composer command in .travis file.
    • --safe and --drafts flags of site:build command was fixed.
    • Updated composer.json: Symfony components to 2.4, Silex to 1.1 and PHP-Markdown lib.
    • Added test for safe mode.
    Source code(tar.gz)
    Source code(zip)
  • v1.0.0-rc.1(Dec 9, 2013)

    What's new in this release?

    • Removed "content" key and it's replaced by "page.content".
    • Use the right Front-matter in the paginator template.
    • Fixed exception thrown when _plugins dir does not exists
    • Update Spresso theme.
    Source code(tar.gz)
    Source code(zip)
  • v1.0.0-beta(Dec 1, 2013)

    What's new in this release?

    • Extends Spress with Plugins.
    • Converters to add new content types.
    • Fixed some bugs.
    • Some parts of code was simplified.
    Source code(tar.gz)
    Source code(zip)
  • v0.2-alpha(Nov 3, 2013)

    What's new in this release?:

    • New converters of content. Converters extend Spress with support to new content types.
    • Deleted unused variables and statements.
    • Fixed bug that replace page index.html with others index.html.
    • "page.date" key is a string value with ISO8601 format
    • Spresso theme: Fixed the problem with post var in post.html.

    This release does not support plugins.

    Source code(tar.gz)
    Source code(zip)
  • v0.1-alpha(Oct 5, 2013)

Owner
Spress
The static site generator in PHP
Spress
PHP Static site generator

Spress - PHP Static site generator Spress is a static site generator built with Symfony components. License: MIT. Requirements Linux, Unix, Mac OS X o

Spress 375 Nov 28, 2022
Sculpin — Static Site Generator

Sculpin - PHP Static Site Generator Sculpin takes data sources such as text files (Markdown, Textile, etc.) and transforms them using Twig templates t

Sculpin 1.4k Jan 4, 2023
WordPress static site generator for security, performance and cost benefits

WordPress static site generator for security, performance and cost benefits

Leon Stafford 1.3k Dec 30, 2022
Cecil is a CLI application that merges plain text files (written in Markdown), images and Twig templates to generate a static website.

Cecil is a CLI application that merges plain text files (written in Markdown), images and Twig templates to generate a static website.

Cecil 208 Dec 13, 2022
Phrozn is extremely flexible static site generator in PHP.

Phrozn Phrozn is extremely flexible static site generator in PHP. Philosophy Configurable: you should be able to tune it to your needs SCM-Enabled: no

Povilas Balzaravičius 459 Oct 30, 2022
PHP Static site generator

Spress - PHP Static site generator Spress is a static site generator built with Symfony components. License: MIT. Requirements Linux, Unix, Mac OS X o

Spress 375 Nov 28, 2022
Sculpin — Static Site Generator

Sculpin - PHP Static Site Generator Sculpin takes data sources such as text files (Markdown, Textile, etc.) and transforms them using Twig templates t

Sculpin 1.4k Jan 4, 2023
WordPress static site generator for security, performance and cost benefits

WordPress static site generator for security, performance and cost benefits

Leon Stafford 1.3k Dec 30, 2022
The official Statamic 3 static site generator package

Statamic Static Site Generator Generate static sites with Statamic 3. Installation Install the package using Composer: composer require statamic/ssg

Statamic 187 Dec 25, 2022
Laravel static site/blog generator with markdown support.

Katana static site & blog generator PHP static site & blog generator with markdown support. Using the power of laravel's Blade templating engine. Kata

Mohamed Said 380 Sep 3, 2022
A static site for the Jenkins automation server

jenkins.io This repository is what powers the Jenkins website. This uses Awestruct with Asciidoctor under the hood to provide a very useful and compel

Jenkins Infra 252 Dec 30, 2022
Starter kit for content-based static site using Stenope

Stenope Skeleton This skeleton is an opinionated starter kit for creating your static website with Stenope. It contains a few features to get you star

Stenope 2 Sep 28, 2022
The fastest pure PHP database framework with a powerful static code generator, supports horizontal scale up, designed for PHP7

Maghead 4.0.x IS CURRENTLY UNDER HEAVY DEVELOPMENT, API IS NOT STABLE Maghead is an open-source Object-Relational Mapping (ORM) designed for PHP7. Mag

Maghead 477 Dec 24, 2022
Simple static Composer repository generator - For a full private Composer repo use Private Packagist

Satis Simple static Composer repository generator. Run from source Satis requires a recent PHP version, it does not run with unsupported PHP versions.

Composer 2.9k Jan 3, 2023
Run your WP site on github pages, php innovation award winner https://www.phpclasses.org/package/12091-PHP-Make-a-WordPress-site-run-on-GitHub-pages.html

Gitpress Run wordpress directly on github pages Gitpress won the innovation award for may 2021 Read more about this https://naveen17797.github.io/gitp

naveen 13 Nov 18, 2022
Site Web pour un site de conciergerie d'entreprise

DATE DE CREATION : 30 novembre 2021 • Développement d'un site Web pour une entreprise de conciergerie pour entreprise, une interface pour les dirigea

Tiffany Dufetel 1 Jan 10, 2022
One time password generator, validator, and qrcode generator that has no web dependencies (self-contained) in PHP

otp-thing One time password generator, validator, and qrcode generator that has no web dependencies (self-contained) in PHP Introduction This started

Daniel Krusky 25 Apr 29, 2022
InfyOm Laravel Generator - API, Scaffold, Tests, CRUD Laravel Generator

InfyOm Laravel Generator Generate Admin Panels CRUDs and APIs in Minutes with tons of other features and customizations with 3 different themes. Read

InfyOmLabs (InfyOm Technologies) 3.5k Jan 1, 2023
Laravel CRUD Generator This Generator package provides various generators like CRUD, API, Controller, Model, Migration, View for your painless development of your applications.

Laravel CRUD Generator This Generator package provides various generators like CRUD, API, Controller, Model, Migration, View for your painless develop

AppzCoder 1.3k Jan 2, 2023
Laravel Design Pattern Generator (api generator)

Laravel Design Pattern Generator (api generator) you can create your restful api easily by using this library and you can filter, sort and include elo

HusseinAlaa 2 Sep 25, 2022