Phrozn is extremely flexible static site generator in PHP.

Overview

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 extra work to make your site git-enabled

Install

Clone repository from github and change to cloned directory.

$ git clone https://github.com/Pawka/phrozn.git && cd phrozn

Download composer and install required dependencies.

$ curl -s https://getcomposer.org/installer | php
$ php composer.phar install

Dev Notes

  • Unit tested
  • API Documentation
  • User manual
  • Relies on SPL, Symfony 2 Components

Runtime Dependencies:

  • PEAR::Console_CommandLine
  • PEAR::Console_Color2
  • PEAR::Console_Table
  • PEAR::Archive_Tar
  • Twig
  • Symfony/Yaml

Developer Dependencies

  • PHPUnit
  • PHPDocumentator 2

License

See LICENSE

Comments
  • PEAR_Exception Class Not found

    PEAR_Exception Class Not found

    The PEAR_Exception class is not found. It need to be added to the composer file somehow. It's extended through Console_CommandLine_Exception

    PEAR_Exception GitHub repo is https://github.com/pear/PEAR_Exception/

    Will issue PR if I can figure out how to get this in.

    opened by farrelley 10
  • Entry variables in layouts?

    Entry variables in layouts?

    I've set the title front layout variable in my entry, but neither {{ title }} nor {{ this.title }} seems to work in the default.twig layout. Any ideas?

    opened by aaronshaf 10
  • Compiling to given directory

    Compiling to given directory

    Currently you should be able to compile your site to a specific directory using phr up [src] [dst]. I have two problems with this.

    1. For some reason ../is appended to the directory. So when I try phr up .phrozn/ test/ it compiles to my current directory. To have to place the files in test I must use phr up .phrozn/ test/test/.

    2. Compiling to a different directory than the current one should be far more common than compiling from another directory than where .phrozn resides, since that is most likely your project's root. Hence I suggest the [src]and [dst] parameters switch order.

    opened by tobiassjosten 9
  • Is PEAR supposed to be required?

    Is PEAR supposed to be required?

    Following the websites "Installation" page, I was getting an exception when trying to run phr relating to a file not being found. I figured out that when I installed PEAR (sudo apt-get install php-pear) it would then work. Aren't the PEAR dependencies supposed to be included in the phrozn package? If PEAR is a dependency, it should be included on the installation page.

    opened by mikehaas763 5
  • Feature/flexible directories

    Feature/flexible directories

    This PR is related to discussion: https://github.com/farazdagi/phrozn/issues/5

    In practice this PR allows an user to use Phrozn in different ways:

    Usual

    phr init
    phr up
    phr single index.twig
    phr clobber
    

    In this way as usual the .phrozn folder was craeted at init and all works normally.

    Not standard folders

    phr init src
    mkdir htdocs
    phr up src htdocs
    

    The project src contains the Phrozn project (no .phrozn folder) and all the generated files are in htdocs folder.

    Project foldering

    - src
      - plugins
      - entries
        - index.twig
        - ...
    - htdocs
      - index.html
      - ...
    

    Clear the project folders

    phr clobber src
    

    This destroy the project folder for not standard structure.

    Plugins autoloading

    To support this feature the plugin autoloader is loaded in order to work in the right folder.

    opened by wdalmut 5
  • Use permalink if exists instead append .html

    Use permalink if exists instead append .html

    Hi mates,

    just another PR. Actually the compilation process when someone put a permalink strategy the .html is appended by default. This trend could be a problem if I need to create particular pages for eg: permalink: /installer that is a script file.

    I think that if place a permalink Phrozn has to use my permalink and not append .html, of course if I create a permalink as /create/this/path/ the result is /create/this/path/index.html

    What do you think about this?

    Bye

    opened by wdalmut 5
  • Make sure that phrozn is installable when PEAR is run form user's dir

    Make sure that phrozn is installable when PEAR is run form user's dir

    From chatlog:

    srsly, is there no way of installing phrozn using pear without being root? I've tried installing pear to my home dir (using debian) with no problems, and installing phrozn into that dir, but phr gives me a lot of wierd errors are the lib paths hard coded?

    opened by farazdagi 5
  • Default folder ./phrozn , problem for IDE

    Default folder ./phrozn , problem for IDE

    Using IDE like netbeans having the default dir as ./phrozn causes hidden directory in the file explorer.

    Good to have the folder setting as a config option.

    opened by icomefromthenet 5
  • Making it work on Windows

    Making it work on Windows

    The first 3 commits are required just to get "phr init" + "phr up" to work on windows. I tried to make the changes as unintrusive as possible.

    You should really decide whether you want to always use "/" as the directory separator, or always use the DIRECTORY_SEPARATOR constant. Either is good, but mixing them up is what causes problems on windows. For start, I just normalized the separators where needed to make "phr up" work.

    In the fourth commit I started fixing tests so they pass on windows. Again, it's linux-specific stuff that fails, see commit messages.

    I tested on Travis so you should be OK to merge, but just look over everything in case I messed something up, since I'm not that familiar with the codebase.

    Cheers, Ivan

    opened by ihabunek 4
  • Use composer to pull in Markdown, Textile, and LESS parsers.

    Use composer to pull in Markdown, Textile, and LESS parsers.

    This is a rahash of #83, but with working tests. I'm somewhat new to GitHub pull requests: if there is a better way to correct someone else's PR, let me know and I'll resubmit it that way.

    The changes in test files are mostly superficial: things like spacing, indentation, and capitalization in CSS hex colors brought on by updating the libraries to the latest versions using composer.

    The changes in the textile output files are weird: the original files had incorrect element nesting and shouldn't have passed. Presumably there was a bug in the original Textile parser.

    opened by itafroma 4
  • Switch to Composer

    Switch to Composer

    Solving issue #59.

    Many failing unit tests on dev branch. Do not blame me for that :-) We'll fix them on separate pull request. Please check my changes, maybe you'll have some comments.

    opened by Pawka 4
  • Broken links and deprecated link on phrozn.info

    Broken links and deprecated link on phrozn.info

    1. From this page: http://phrozn.info/en/documentation/articles/getting-started/ The link to the sample site is broken: http://sample.phrozn.info/
    2. The footer, presumably on any page, is linking to the broken link: Wizardcat, http://wizardcat.com/eng
    3. The main page http://phrozn.info/en/ links to code coverage, which is broken: http://test.phrozn.info/
    4. Deprecated link: There's a link somewhere in the site that still links to the old phrozn-site repository, which has a readme saying that it is deprecated! But the link on the site still links to it.
    opened by tchalvak 0
  • added ability to configure the Markdown parser

    added ability to configure the Markdown parser

    I really like Phrozn, but wanted to make it easier to use Google Prettify within Markdown. It's possible to configure the Markdown parser to include the required 'prettyprint' class on the <pre> tag, but there was no way to do that within Phrozn.

    This pull request corrects that. It's a fairly simple change only to the Markdown processor to look for likely configuration settings in both the front matter and the sitewide config.yml. While this opens up all the configurable parts of Markdown Extra, my original goal of making code blocks play with Google Prettify is achieved by adding this to config.yml

    markdown:
        code_class_prefix: "prettyprint lang-"
        code_attr_on_pre: true
    

    Using this I can format code in Markdown with fenced code blocks which also hint at the syntax to be used

     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ js
     {
        "foo": "sample JSON",
        "bar": "http://www.example.com"
     }
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    

    Markdown will render that with <pre class="prettyprint lang-js"><code>...</code></pre> and the Google Prettify script will play nicely with it.

    opened by lordelph 3
  • Phrozn as library

    Phrozn as library

    I think it will be better to split this repo into two separate: phozn and phozn-skeleton-app (for example).

    Pros:

    • simplify phrozn version maintenance during projects lifetime
    • allow to create projects via composer (composer create-project pawka/phrozn-skeleton-app)
    • allow for custom installation steps via composer scripts
    • move tests for phrozn from app repo.

    Cons:

    • Breaks BC. Maybe for future releases?
    opened by fesor 1
  • Code block nukes white space

    Code block nukes white space

    Hello,

    If I run

    {
        "custom_field_redirect_fb": {
            "LONG_MD5_FIELD_ID": {
                "exists": {
                    "step": "LONG_MD5_PAGE_ID",
                    "page": "LONG_MD5_PAGE_ID"
                },
                "not_exists": {
                    "step": "LONG_MD5_PAGE_ID",
                    "page": "LONG_MD5_PAGE_ID"
                }
            }
        }
    }
    

    Through PHP-MarkDown I get

    <p><code>{
        "custom_field_redirect_fb": {
            "LONG_MD5_FIELD_ID": {
                "exists": {
                    "step": "LONG_MD5_PAGE_ID",
                    "page": "LONG_MD5_PAGE_ID"
                },
                "not_exists": {
                    "step": "LONG_MD5_PAGE_ID",
                    "page": "LONG_MD5_PAGE_ID"
                }
            }
        }
    }</code></p>
    

    Yet when I run it through Phrozn it generates

    <p><code>{
    "custom_field_redirect_fb": {
    "LONG_MD5_FIELD_ID": {
        "exists": {
            "step": "LONG_MD5_PAGE_ID",
            "page": "LONG_MD5_PAGE_ID"
        },
        "not_exists": {
            "step": "LONG_MD5_PAGE_ID",
            "page": "LONG_MD5_PAGE_ID"
        }
    }
    }
    }</code></p>
    
    opened by dubcanada 0
  • Sample site: css and js broken on nested pages

    Sample site: css and js broken on nested pages

    For example, initialize a new site, and then view the about page:

    GET http://example.org/about/scripts/bootstrap-dropdown.js 404 (Not Found)
    GET http://example.org/about/styles/default.css 404 (Not Found) 
    ...
    

    It would appear /layouts/default.twig needs to be changed to use absolute references instead of relative for both the styles and scripts sections.

    opened by mrobb 0
Owner
Povilas Balzaravičius
Povilas Balzaravičius
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 Nov 28, 2022
WordPress static site generator for security, performance and cost benefits

WordPress static site generator for security, performance and cost benefits

Leon Stafford 1.2k Nov 26, 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 206 Nov 19, 2022
YCOM Impersonate. Login as selected YCOM user 🧙‍♂️in frontend.

YCOM Impersonate Login as selected YCOM user in frontend. Features: Backend users with admin rights or YCOM[] rights, can be automatically logged in v

Friends Of REDAXO 17 Sep 12, 2022
🚀Hyperf is an extremely performant and flexible PHP CLI framework

Hyperf is an extremely performant and flexible PHP CLI framework, powered by a state-of-the-art coroutine server and a large number of battle-tested components. Aside from decisively beating PHP-FPM frameworks in benchmarks, Hyperf is unique in its focus on flexibility and composition.

Hyperf 4.9k Nov 28, 2022
Hyperf is an extremely performant and flexible PHP CLI framework

?? A coroutine framework that focuses on hyperspeed and flexibility. Building microservice or middleware with ease.

Hyperf 4.9k Nov 29, 2022
Site-builder is a simple static site generator. It allows you to create and manage a website out of simple text files and templates.

Site-builder is a simple static site generator. It allows you to create and manage a website out of simple text files and templates. This gives you many of the advantages of a CMS, but because the result is plain old HTML, it's more secure and has higher performance.

Matt Robinson 28 May 24, 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 Nov 28, 2022
WordPress static site generator for security, performance and cost benefits

WordPress static site generator for security, performance and cost benefits

Leon Stafford 1.2k Nov 26, 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 184 Nov 20, 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
MINI is an extremely simple and easy to understand skeleton PHP application

MINI MINI is an extremely simple and easy to understand skeleton PHP application, reduced to the max. MINI is NOT a professional framework and it does

Chris 1.3k Nov 26, 2022
UMySQL is an extremely simple PHP library for communicating with MySQL databases with ease while keeping overhead to a bare minimum.

Uncomplicated MySQL UMySQL is an extremely simple PHP library for communicating with MySQL databases with ease while keeping overhead to a bare minimu

José Miguel Moreno 4 Oct 24, 2022
An extremely customizable BuildBattle mini-game designed for scalability and simplicity.

BuildBattle An extremely customizable BuildBattle mini-game designed for scalability and simplicity. Features Customisable messages and scoreboard Mul

null 11 Sep 18, 2022
ExpressionEngine is a flexible, feature-rich, free open-source content management platform that empowers hundreds of thousands of individuals and organizations around the world to easily manage their web site.

ExpressionEngine CMS ExpressionEngine is a mature, flexible, secure, free open-source content management system. It is beloved by designers for giving

ExpressionEngine 405 Dec 2, 2022
Powerful and flexible component for building site breadcrumbs.

Phalcon Breadcrumbs Phalcon Breadcrumbs is a powerful and flexible component for building site breadcrumbs. You can adapt it to your own needs or impr

Serghei Iakovlev 40 Nov 5, 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 478 Nov 27, 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 250 Dec 5, 2022