Coder Social home page Coder Social logo

phrozn's Introduction

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

phrozn's People

Contributors

ajgarlag avatar bladeofsteel avatar cs278 avatar farazdagi avatar goutte avatar grummfy avatar haruair avatar o avatar pawka avatar sasezaki avatar simensen avatar sumpygump avatar treffynnon avatar wdalmut avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

phrozn's Issues

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.

Notice when calling phr update

Warning: array_merge(): Argument #1 is not an array in /usr/local/php531/lib/php/Phrozn/Site/View/Base.php on line 341

Call Stack:
0.0003 333004 1. {main}() /usr/local/php531/bin/phr:0
0.0101 792984 2. Phrozn\Runner\CommandLine->run() /usr/local/php531/bin/phr:15
0.1014 1435284 3. Phrozn\Runner\CommandLine->parse() /usr/local/php531/lib/php/Phrozn/Runner/CommandLine.php:98
0.1094 1450092 4. Phrozn\Runner\CommandLine->invoke() /usr/local/php531/lib/php/Phrozn/Runner/CommandLine.php:134
0.1113 1579724 5. call_user_func() /usr/local/php531/lib/php/Phrozn/Runner/CommandLine.php:159
0.1113 1579724 6. Phrozn\Runner\CommandLine\Callback\Up->execute() /usr/local/php531/lib/php/Phrozn/Runner/CommandLine.php:0
0.1113 1579724 7. Phrozn\Runner\CommandLine\Callback\Up->updateProject() /usr/local/php531/lib/php/Phrozn/Runner/CommandLine/Callback/Up.php:49
0.1267 1766656 8. Phrozn\Site\DefaultSite->compile() /usr/local/php531/lib/php/Phrozn/Runner/CommandLine/Callback/Up.php:88
0.1654 2632388 9. Phrozn\Site\DefaultSite->processQueue() /usr/local/php531/lib/php/Phrozn/Site/DefaultSite.php:48
0.9029 3820460 10. Phrozn\Site\View\Base->getParam() /usr/local/php531/lib/php/Phrozn/Site/DefaultSite.php:66
0.9032 3844820 11. Phrozn\Site\View\Base->getParams() /usr/local/php531/lib/php/Phrozn/Site/View/Base.php:315
0.9073 3847336 12. array_merge() /usr/local/php531/lib/php/Phrozn/Site/View/Base.php:341

a way to configure processor?

Hello,
I think it can be intresting to configure twig or other processor. Activating or adding extensions (included cutom one),

Can't run phr init

I have installed all the files based on the installation guide and created the soft link correctly.

But, when i run the phr init in the public_html directory, the following error shown:

PHP Warning: require_once(PEAR/Exception.php): failed to open stream: No such file or directory in /home/jack/github/phrozn/vendor/pear/console_commandline/Console/CommandLine/Exception.php on line 28
PHP Fatal error: require_once(): Failed opening required 'PEAR/Exception.php' (include_path='/home/jack/github/phrozn/vendor/pear/console_commandline:/home/jack/github/phrozn/Phrozn/:/home/jack/github/phrozn:/home/jack/github/phrozn/bin/../:.:/usr/share/php:/usr/share/pear') in /home/jack/github/phrozn/vendor/pear/console_commandline/Console/CommandLine/Exception.php on line 28

live updates

I think it would be very nice to have live update support.

Autoloader not found when phrozn installed as project via Composer

Use case:

  • Install phrozn via composer (add farazdagi/phrozn as requirement to composer.json)
  • Run composer.phar install
  • Try call php vendor/farazdagi/phrozn/bin/phr.php

All dependencies will be downloaded to project vendor dir (instead of phrozn vendor dir) and phrozn is unable to find Composer autoload.php file.

Fix:
Phrozn searches for vendor/autoload.php file in phrozn dir. If there is no such file, it tries look up under current working dir. I'm not sure if it is the best way to do, if you have any ideas, let me know.

No releases available

Hello,

When i want to install the beta package i have an error :

C:\PHP>pear install phrozn/Phrozn-beta
No releases available for package "pear.phrozn.info/Phrozn"
install failed


C:\PHP>pear remote-list -c phrozn
CHANNEL PHROZN AVAILABLE PACKAGES:
==================================
PACKAGE VERSION
Phrozn  -n/a-

Is there a problem with my installation or you repository ?

Make sure that phr-dev defaults to phr in UTs

  • in order to distinguish between current stable and dev version of Phrozn, UTs are run using phr-dev executable
  • if phr-dev is undefined in your /usr/bin, fallback to /usr/bin/phr

-R/--regen flag doesn't work

Splitting a new issue from my #9 comments:

phr up --regen src dest/something isn't actually erasing contents from src. If I delete a file, let's say entries/to_delete.twig, then use the --regen command, I'd expect the previously generated to_delete.html file to be deleted. However, it stays there. A simple phr up src dest/another_thing also doesn't delete it:

$ mkdir src dst && phr init src
$ phr up src dst && ls dst
about/ demos/ index.html media/ scripts/ styles/
$ echo "something" > src/.phrozn/entries/to_delete.twig
$ phr up src dst && ls dst
about/ demos/ index.html media/ scripts/ styles/ to_delete.html
$ rm src/.phrozn/entries/to_delete.twig
$ phr up src dst && ls dst
about/ demos/ index.html media/ scripts/ styles/ to_delete.html
$ phr up -R src dst && ls dst
about/ demos/ index.html media/ scripts/ styles/ to_delete.html
$ phr up --regen src dst && ls dst
about/ demos/ index.html media/ scripts/ styles/ to_delete.html
$ rm -rf dst && mkdir dst
$ phr up src dst && ls dst
about/ demos/ index.html media/ scripts/ styles/

So, short from manually rm'ing the dst folder, there's no way for a deleted source file to cause its corresponding generated file to also be deleted during a phr up.

Default.layout not used

Whenever layout is changed, somewhere in files all consequent requests are rendered from there too.
This happened on official site - when documentation rendered incorrectly if layout: default.twig not provided in every file.

Support for Scss

Phrozn currently uses leafo's phpless compiler. They also have a very similar Scss compiler. It should be pretty trivial to add support for it.

Generic Provider to access entries

To print summary pages, rss feeds and such i feel the need to access all the data from the other views in a template.

For example:

{% for entry in site.entries %}

This is of limited use though, as i need them sorted by a FM variable:

{% for entry in site.entries.sort("fm_varname", "DESC") %}

Support for compass

Would be nice to have support for sass/compass. On the homepage it says sass it supported, but I must be missing something?

migrate to Console_Color2

"pear/Console_Color" is deprecated in favor of "pear/Console_Color2" so Phrozn needs to use it instead of Console_Color

Enable rst processor

  • Bundle provided and working fine
  • make sure that bundle is recognized in the next release

Phrozn installed with Composer still requires PEAR to be installed

  • Installed PHP5.4.4 on Debian (RaspberryPi)
  • Installed Composer
  • Init a new Phrozn composer project

Any attempt to run phrozn resulted in a php error relating not being able to locate PEAR/Exception.php

Pear/pear_exception was correctly installed from composer

Installing PEAR systemwide resolved it

Phrozn/Autoloader.php

Trying installing Phrozn on a dreamhost shared account and here is the message from the terminal:

Warning: require_once(Phrozn/Autoloader.php): failed to open stream: No such file or directory in /home/myuser/pear/phr on line 12

Fatal error: require_once(): Failed opening required 'Phrozn/Autoloader.php' (include_path='.:/usr/local/lib/php:/usr/local/php5/lib/pear') in /home/myuser/pear/phr on line 12

I'm quite new to this so if anyone got an idea, you're more than welcome...

Phrozn - Composer Style install tool

Hi guys,

what do you think about using phar as default way to use phrozn? If we use an approach similar to composer install script could be more simple to start a project with Phrozn.

Look this:

$ curl -s http://www.phrozn.info/installer/ | php 
$ php phrozn.phar init
$ php phrozn.phar update

or with an existing project

$ mkdir mywebsite
$ cd mywebsite
$ git clone http://git.domain.tld/mywebsite.git .phrozn
$ curl -s http://www.phrozn.info/installer/ | php 
$ php phrozn.phar update

It is simple and looks great imho...

The phrozn-site can host the installer (I propose a PR later...)

I also attach the composer install script refactored to Phrozn purposes.

#!/usr/bin/env php
<?php

/*
 * This file is part of Phrozn.
 *
 * (c) Walter Dal Mut <[email protected]>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

process($argv);

/**
 * processes the installer
 */
function process($argv)
{
    $check      = in_array('--check', $argv);
    $help       = in_array('--help', $argv);
    $force      = in_array('--force', $argv);
    $quiet      = in_array('--quiet', $argv);
    $installDir = false;

    foreach ($argv as $key => $val) {
        if (0 === strpos($val, '--install-dir')) {
            if (13 === strlen($val) && isset($argv[$key+1])) {
                $installDir = trim($argv[$key+1]);
            } else {
                $installDir = trim(substr($val, 14));
            }
        }
    }

    if ($help) {
        displayHelp();
        exit(0);
    }

    $ok = checkPlatform($quiet);

    if (false !== $installDir && !is_dir($installDir)) {
        out("The defined install dir ({$installDir}) does not exist.", 'info');
        $ok = false;
    }

    if ($check) {
        exit($ok ? 0 : 1);
    }

    if ($ok || $force) {
        installPhrozn($installDir, $quiet);
        exit(0);
    }

    exit(1);
}

/**
 * displays the help
 */
function displayHelp()
{
    echo <<<EOF
Phrozn Installer
------------------
Options
--help               this help
--check              for checking environment only
--force              forces the installation
--install-dir="..."  accepts a target installation directory

EOF;
}

/**
 * check the platform for possible issues on running phrozn
 */
function checkPlatform($quiet)
{
    $errors = array();
    $warnings = array();

    $iniPath = php_ini_loaded_file();
    $displayIniMessage = false;
    if ($iniPath) {
        $iniMessage = PHP_EOL.PHP_EOL.'The php.ini used by your command-line PHP is: ' . $iniPath;
    } else {
        $iniMessage = PHP_EOL.PHP_EOL.'A php.ini file does not exist. You will have to create one.';
    }

    if (ini_get('detect_unicode')) {
        $errors['unicode'] = 'On';
    }

    if (extension_loaded('suhosin')) {
        $suhosin = ini_get('suhosin.executor.include.whitelist');
        $suhosinBlacklist = ini_get('suhosin.executor.include.blacklist');
        if (false === stripos($suhosin, 'phar') && (!$suhosinBlacklist || false !== stripos($suhosinBlacklist, 'phar'))) {
            $errors['suhosin'] = $suhosin;
        }
    }

    if (!extension_loaded('Phar')) {
        $errors['phar'] = true;
    }

    if (!ini_get('allow_url_fopen')) {
        $errors['allow_url_fopen'] = true;
    }

    if (extension_loaded('ionCube Loader') && ioncube_loader_iversion() < 40009) {
        $errors['ioncube'] = ioncube_loader_version();
    }

    if (version_compare(PHP_VERSION, '5.3.2', '<')) {
        $errors['php'] = PHP_VERSION;
    }

    if (version_compare(PHP_VERSION, '5.3.4', '<')) {
        $warnings['php'] = PHP_VERSION;
    }

    if (!extension_loaded('openssl')) {
        $warnings['openssl'] = true;
    }

    if (ini_get('apc.enable_cli')) {
        $warnings['apc_cli'] = true;
    }

    ob_start();
    phpinfo(INFO_GENERAL);
    $phpinfo = ob_get_clean();
    if (preg_match('{Configure Command(?: *</td><td class="v">| *=> *)(.*?)(?:</td>|$)}m', $phpinfo, $match)) {
        $configure = $match[1];

        if (false !== strpos($configure, '--enable-sigchild')) {
            $warnings['sigchild'] = true;
        }

        if (false !== strpos($configure, '--with-curlwrappers')) {
            $warnings['curlwrappers'] = true;
        }
    }

    if (!empty($errors)) {
        out("Some settings on your machine make Phrozn unable to work properly.", 'error');

        out('Make sure that you fix the issues listed below and run this script again:', 'error');
        foreach ($errors as $error => $current) {
            switch ($error) {
                case 'phar':
                    $text = PHP_EOL."The phar extension is missing.".PHP_EOL;
                    $text .= "Install it or recompile php without --disable-phar";
                    break;

                case 'unicode':
                    $text = PHP_EOL."The detect_unicode setting must be disabled.".PHP_EOL;
                    $text .= "Add the following to the end of your `php.ini`:".PHP_EOL;
                    $text .= "    detect_unicode = Off";
                    $displayIniMessage = true;
                    break;

                case 'suhosin':
                    $text = PHP_EOL."The suhosin.executor.include.whitelist setting is incorrect.".PHP_EOL;
                    $text .= "Add the following to the end of your `php.ini` or suhosin.ini (Example path [for Debian]: /etc/php5/cli/conf.d/suhosin.ini):".PHP_EOL;
                    $text .= "    suhosin.executor.include.whitelist = phar ".$current;
                    $displayIniMessage = true;
                    break;

                case 'php':
                    $text = PHP_EOL."Your PHP ({$current}) is too old, you must upgrade to PHP 5.3.2 or higher.";
                    break;

                case 'allow_url_fopen':
                    $text = PHP_EOL."The allow_url_fopen setting is incorrect.".PHP_EOL;
                    $text .= "Add the following to the end of your `php.ini`:".PHP_EOL;
                    $text .= "    allow_url_fopen = On";
                    $displayIniMessage = true;
                    break;

                case 'ioncube':
                    $text = PHP_EOL."Your ionCube Loader extension ($current) is incompatible with Phar files.".PHP_EOL;
                    $text .= "Upgrade to ionCube 4.0.9 or higher or remove this line (path may be different) from your `php.ini` to disable it:".PHP_EOL;
                    $text .= "    zend_extension = /usr/lib/php5/20090626+lfs/ioncube_loader_lin_5.3.so";
                    $displayIniMessage = true;
                    break;
            }
            if ($displayIniMessage) {
                $text .= $iniMessage;
            }
            out($text, 'info');
        }

        out('');
        return false;
    }

    if (!empty($warnings)) {
        out("Some settings on your machine may cause stability issues with Phrozn.", 'error');

        out('If you encounter issues, try to change the following:', 'error');
        foreach ($warnings as $warning => $current) {
            switch ($warning) {
                case 'apc_cli':
                    $text = PHP_EOL."The apc.enable_cli setting is incorrect.".PHP_EOL;
                    $text .= "Add the following to the end of your `php.ini`:".PHP_EOL;
                    $text .= "    apc.enable_cli = Off";
                    $displayIniMessage = true;
                    break;

                case 'sigchild':
                    $text = PHP_EOL."PHP was compiled with --enable-sigchild which can cause issues on some platforms.".PHP_EOL;
                    $text .= "Recompile it without this flag if possible, see also:".PHP_EOL;
                    $text .= "    https://bugs.php.net/bug.php?id=22999";
                    break;

                case 'curlwrappers':
                    $text = PHP_EOL."PHP was compiled with --with-curlwrappers which will cause issues with HTTP authentication and GitHub.".PHP_EOL;
                    $text .= "Recompile it without this flag if possible";
                    break;

                case 'openssl':
                    $text = PHP_EOL."The openssl extension is missing, which will reduce the security and stability of Phrozn.".PHP_EOL;
                    $text .= "If possible you should enable it or recompile php with --with-openssl";
                    break;

                case 'php':
                    $text = PHP_EOL."Your PHP ({$current}) is quite old, upgrading to PHP 5.3.4 or higher is recommended.".PHP_EOL;
                    $text .= "Phrozn works with 5.3.2+ for most people, but there might be edge case issues.";
                    break;
            }
            if ($displayIniMessage) {
                $text .= $iniMessage;
            }
            out($text, 'info');
        }

        out('');
        return true;
    }

    if (!$quiet) {
        out("All settings correct for using Phrozn", 'success');
    }
    return true;
}

/**
 * installs phrozn to the current working directory
 */
function installPhrozn($installDir, $quiet)
{
    $installPath = (is_dir($installDir) ? rtrim($installDir, '/').'/' : '') . 'phrozn.phar';
    $installDir = realpath($installDir) ? realpath($installDir) : getcwd();
    $file       = $installDir.DIRECTORY_SEPARATOR.'phrozn.phar';

    if (is_readable($file)) {
        @unlink($file);
    }

    $retries = 3;
    while ($retries--) {
        if (!$quiet) {
            out("Downloading...", 'info');
        }

        //$source = (extension_loaded('openssl') ? 'https' : 'http').'://phrozn.local/phrozn.phar';
        $source = 'http://phrozn.local/phrozn.phar';
        out($source);
        $errorHandler = new ErrorHandler();
        set_error_handler(array($errorHandler, 'handleError'));
        if (!copy($source, $file, getStreamContext())) {
            out('Download failed: '.$errorHandler->message, 'error');
        }
        restore_error_handler();
        if ($errorHandler->message) {
            continue;
        }

        try {
            // test the phar validity
            $phar = new Phar($file);
            // free the variable to unlock the file
            unset($phar);
            break;
        } catch (Exception $e) {
            if (!$e instanceof UnexpectedValueException && !$e instanceof PharException) {
                throw $e;
            }
            unlink($file);
            if ($retries) {
                if (!$quiet) {
                   out('The download is corrupt, retrying...', 'error');
                }
            } else {
                out('The download is corrupt ('.$e->getMessage().'), aborting.', 'error');
                exit(1);
            }
        }
    }

    if ($errorHandler->message) {
        out('The download failed repeatedly, aborting.', 'error');
        exit(1);
    }

    chmod($file, 0755);

    if (!$quiet) {
        out(PHP_EOL."Phrozn successfully installed to: " . $file, 'success', false);
        out(PHP_EOL."Use it: php $installPath", 'info');
    }
}

/**
 * colorize output
 */
function out($text, $color = null, $newLine = true)
{
    if (DIRECTORY_SEPARATOR == '\\') {
        $hasColorSupport = false !== getenv('ANSICON');
    } else {
        $hasColorSupport = true;
    }

    $styles = array(
        'success' => "\033[0;32m%s\033[0m",
        'error' => "\033[31;31m%s\033[0m",
        'info' => "\033[33;33m%s\033[0m"
    );

    $format = '%s';

    if (isset($styles[$color]) && $hasColorSupport) {
        $format = $styles[$color];
    }

    if ($newLine) {
        $format .= PHP_EOL;
    }

    printf($format, $text);
}

/**
 *
 */
function getStreamContext()
{
    $options = array('http' => array());

    // Handle system proxy
    if (!empty($_SERVER['HTTP_PROXY']) || !empty($_SERVER['http_proxy'])) {
        // Some systems seem to rely on a lowercased version instead...
        $proxy = parse_url(!empty($_SERVER['http_proxy']) ? $_SERVER['http_proxy'] : $_SERVER['HTTP_PROXY']);
    }

    if (!empty($proxy)) {
        $proxyURL = isset($proxy['scheme']) ? $proxy['scheme'] . '://' : '';
        $proxyURL .= isset($proxy['host']) ? $proxy['host'] : '';

        if (isset($proxy['port'])) {
            $proxyURL .= ":" . $proxy['port'];
        } elseif ('http://' == substr($proxyURL, 0, 7)) {
            $proxyURL .= ":80";
        } elseif ('https://' == substr($proxyURL, 0, 8)) {
            $proxyURL .= ":443";
        }

        // http(s):// is not supported in proxy
        $proxyURL = str_replace(array('http://', 'https://'), array('tcp://', 'ssl://'), $proxyURL);

        if (0 === strpos($proxyURL, 'ssl:') && !extension_loaded('openssl')) {
            throw new \RuntimeException('You must enable the openssl extension to use a proxy over https');
        }

        $options['http'] = array(
            'proxy'           => $proxyURL,
            'request_fulluri' => true,
        );

        if (isset($proxy['user'])) {
            $auth = $proxy['user'];
            if (isset($proxy['pass'])) {
                $auth .= ':' . $proxy['pass'];
            }
            $auth = base64_encode($auth);

            $options['http']['header'] = "Proxy-Authorization: Basic {$auth}\r\n";
        }
    }

    return stream_context_create($options);
}

class ErrorHandler
{
    public $message = '';

    public function handleError($code, $msg)
    {
        if ($this->message) {
            $this->message .= "\n";
        }
        $this->message .= preg_replace('{^copy\(.*?\): }', '', $msg);
    }
}

Exclude Directories

I know you can exclude files in the config.yml, but it doesn't seem to exclude directories. The problem I have is that I use git to maintain some of my files, and it processes the entire .git folder. I would prefer to just ignore this folder, but haven't found a way.

Is this possible in the config.yml?

Add router

I would like to have a router function in my twig (or other) layouts to generate links, like the one in symfony2 for example {{ path('entries-file-name') }}. it should then look at the permalink of that entry and link it.

Add passthru option to front matter

  • when skip option is set file is skipped completely
  • when ignore or passthru or noprocessor is set file is simply copied

Probably petter solution will be to allow to switch processors dynamically, using processor option, thus overriding processor guessed from extension.

local server?

Hi,

Two questions:

Does phrozn have a local server so I can see what my site is going to look like before uploading?

When I just click on the home page index.html in my file manager, I see a mostly unstyled page. Is that right?

Thanks!

Switch to Composer

Problem

  • Vendors code should not be stored on repository.
  • Console_CommandLine and Console_Color2 are not included to Vendors and must be installed globally on the system.

Suggestion

  • Prepare Phrozn to be installed via Composer (we'll switch to Composer autoloader instead of current one).
  • Composer will download all dependencies and Vendors code will be removed from source.
  • Phrozn will run independently from global libraries.

What do you think about my suggestion? If you need help, I can work on this.

Problems with skipping files and scripts folder

Selam Victor,

Today i discovered two different problems with Phrozn. First of all, .DS_Store files not ignoring and copied when updating project.

Second,
I added a empty file named README to scripts folder, but phrozn writes .phrozn/scripts/README to root folder with name README, also scripts (oh sorry not styles) folder not be created.

Here is the screenshot about this problems http://i53.tinypic.com/iqwha1.png
Görüşmek üzere

Unittest failed

"Out of the box" test fails. Need instructions for setup the environment for the unittests.

/styles/ folder gets compiled

I have stylesheet frameworks, for example blueprint that ship with images that are relative, therefore also in the styles folder and start getting compiled into the main directory.

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?

On Windows

Hi,

First, very interesting project. I'm sure going to give it a try. But I'm on a Windows machine, and phr init creates a .phrozn directory at the root of the current drive (C:/.phrozn) and not in the currently active directory. Any way around this problem ?

Calling phr directly didn't work from the command line by the way. I had to call php -f phr init, so I guess the problem is there ?

Cheers,

Wouter

Cannot create directory if file exists and returns 0

If a file exists with the same name as a directory which is gonna be created, phrozn throws an error but then continues and exits with status code 0.

PHP Warning: mkdir(): File exists in /home/muling/phrozn/Phrozn/Site/View/Base.php on line 134
file_put_contents(/home/muling/testsite/test/index.html): failed to open stream: No such file or directory in /home/muling/phrozn/Phrozn/Site/View/Base.php on line 138
[OK] ./.phrozn/entries/test.twig parsed

Composer Autoloader will not load plugins from project Directory.

Composer Autoloader will not load plugins from project Directory, when using phrozn from global install and not a fork of the main repo.

Looks like this feature was removed when switch was made to use composer as the exclusive autoloader, as this did work when Zend2 was in use.

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.