312 Commits

Author SHA1 Message Date
Daniel Rudolf
2d9b5aa1a2 Fix operators 2015-11-29 16:39:03 +01:00
Daniel Rudolf
698a249d45 Force Pico::$requestUrl to have no leading/trailing slash
Fixes #291
2015-11-27 22:52:45 +01:00
Daniel Rudolf
98022a5a8f Update CHANGELOG.md 2015-11-27 20:21:13 +01:00
Daniel Rudolf
2761f8b751 Refactor Pico::isUrlRewritingEnabled() 2015-11-27 20:13:17 +01:00
Daniel Rudolf
cb15ea7493 Amend #286 2015-11-27 19:49:53 +01:00
Daniel Rudolf
86d1f713f2 Move PHP version check to index.php 2015-11-27 19:45:21 +01:00
Daniel Rudolf
81138ce06a Merge branch 'master' of github.com:picocms/Pico 2015-11-27 19:43:47 +01:00
Daniel Rudolf
f97cd83cc8 Merge pull request #286 from dmelo/composer-compat
change Pico's default `index.php` to be compatible with `composer require picocms/pico`
2015-11-27 19:43:10 +01:00
Daniel Rudolf
e14c007789 Default theme: Replace tabs with 4-space-indentation 2015-11-27 19:32:12 +01:00
Daniel Rudolf
913cf3816f Plugins: Improve onPagesLoaded() code styling 2015-11-27 19:31:22 +01:00
Daniel Rudolf
364b9066d9 PicoDeprecated: Use $GLOBALS superglobal instead of global keyword 2015-11-27 19:30:25 +01:00
Daniel Rudolf
81821e7811 Improve Pico::getBaseUrl() code styling 2015-11-27 19:28:48 +01:00
theshka
1fae7ab3df * [New] added PHP_VERSION check to Pico::run() 2015-11-27 12:27:45 -06:00
Diogo Oliveira de Melo
70d813eafe change the way to call autoload.php.
- As suggested by @theshka, this code first verify if Pico is being used
as local composer install, then verify if it is being used as a composer
library.
2015-11-27 02:16:06 -02:00
Daniel Rudolf
38d2dd2e20 Travis: Remove .git dirs from vendor/ dir when deploying
See https://github.com/picocms/Pico/issues/289#issuecomment-159722672 - thanks to @joshas for spotting
2015-11-25 23:38:22 +01:00
Daniel Rudolf
4ddde6b9fb Travis: Deploy on every repo, forks usually don't setup Travis 2015-11-25 20:38:27 +01:00
Daniel Rudolf
d503cea954 Travis: Don't test vendor PHP files 2015-11-25 20:37:45 +01:00
Daniel Rudolf
b198ad48c6 Travis: Allow PHP nightly builds to fail 2015-11-25 20:04:46 +01:00
Daniel Rudolf
20387e0bf9 Make DummyPlugin class final
Plugin developers MUST NOT extend from DummyPlugin, they SHOULD extend from AbstractPicoPlugin
2015-11-25 04:10:22 +01:00
Daniel Rudolf
876a500ecf Improve .gitignore 2015-11-25 04:07:57 +01:00
Daniel Rudolf
840d41bca5 Improve type hinting 2015-11-25 04:07:46 +01:00
Daniel Rudolf
2982f5deb9 Optimize composer autoloader before deploying
This converts PSR-0/PSR-4 autoloading to classmap to get a faster autoloader (up to 20% performance increase)
2015-11-24 19:49:16 +01:00
Diogo Oliveira de Melo
85442266b5 update CHANGELOG 2015-11-23 20:29:33 -02:00
Diogo Oliveira de Melo
9e752c1d29 It works when Pico is installed as a dependency 2015-11-23 20:11:42 -02:00
Daniel Rudolf
bd24d518f2 Update .gitignore 2015-11-23 21:33:57 +01:00
Daniel Rudolf
c34afad4af Fix typo 2015-11-22 14:08:35 +01:00
Daniel Rudolf
60c627c214 Update composer.json: Use latest MINOR versions of Twig/Parsedown/YAML 2015-11-22 14:08:06 +01:00
Daniel Rudolf
d59dba0b5f Update README.md: Add update instructions for composer users 2015-11-21 22:13:54 +01:00
Daniel Rudolf
d252df4b98 Throw RuntimeException on invalid content dirs 2015-11-19 04:48:22 +01:00
Daniel Rudolf
3e4bcd4289 Update CONTRIBUTING.md: Fix typo 2015-11-18 00:41:38 +01:00
Daniel Rudolf
3b737aac1a Update README.md: Update "edit inline docs" link 2015-11-18 00:34:59 +01:00
Daniel Rudolf
c0d30d20f8 Follow-up to c72ea0e
Don't use Pico::getAbsolutePath() for $config['content_dir'], just make sure the trailing slash exists. The config.php in Picos root dir should be interpreted exactly like in Pico 0.9 (the option didn't exist in Pico 0.8), thus the path isn't necessarily relative to Picos root dir
2015-11-14 16:50:32 +01:00
Daniel Rudolf
71076e8eba Update CHANGELOG.md 2015-11-14 00:27:49 +01:00
Daniel Rudolf
e0c1e068fb Default theme: Improve table styling 2015-11-14 00:26:45 +01:00
Daniel Rudolf
636f27ae2f Add asset handling recommendations to inline user docs
Thanks @smcdougall for giving the hint about this
2015-11-14 00:26:26 +01:00
Daniel Rudolf
aa68cfaa45 Update CHANGELOG.md 2015-11-13 22:34:47 +01:00
Daniel Rudolf
f5006c036a Prevent double slashes in base_url when installed to document root
Fixes #274
2015-11-13 22:29:58 +01:00
Daniel Rudolf
c72ea0ecec PicoDeprecated: Sanitize content_dir and base_url options when reading config.php in Picos root dir 2015-11-13 19:10:30 +01:00
Daniel Rudolf
282b7ce16c Update CHANGELOG.md 2015-11-12 20:36:05 +01:00
Daniel Rudolf
78ceabe878 Various improvements
- Reuse ParsedownExtra object
- Add new markdown Twig filter
- Improve class docs in general
- Document plugin number prefix usage
2015-11-12 15:34:56 +01:00
Daniel Rudolf
8ff18c9366 Update CHANGELOG.md 2015-11-08 14:35:28 +01:00
Daniel Rudolf
f9e9642c22 Fix Pico::getPageUrl()
With enabled URL rewriting we must call rawurlencode() on the file path parts rather the whole path
2015-11-08 14:01:35 +01:00
Daniel Rudolf
6638c2b0ee CONTRIBUTING.md: Clarify the suggested branching concept 2015-11-08 03:54:58 +01:00
Daniel Rudolf
2ca711ad59 Add missing rawurlencode() to Pico::getPageUrl()
Replace urldecode() in Pico::evaluateRequestUrl() with rawurldecode()
See #272 for details, thanks @smcdougall for spotting!
2015-11-08 03:12:18 +01:00
Daniel Rudolf
e144cce6b1 Update .gitignore 2015-11-06 21:19:17 +01:00
Daniel Rudolf
7b4ad7f234 Version 1.0.0-beta.1
**Note:** This changelog only provides basic information about the enormous
          changes introduced with Pico 1.0.0-beta.1. Please refer to the
          UGPRADE section of the docs for details.

```
* [Security] (9e2604a) Prevent content_dir breakouts using malicious URLs
* [New] Pico is on its way to its first stable release!
* [New] Provide pre-bundled releases
* [New] Heavily expanded documentation (inline code docs, user docs, dev docs)
* [New] New routing system using the QUERY_STRING method; Pico now works
        out-of-the-box with any webserver and without URL rewriting; use
        `%base_url%?sub/page` in markdown files and `{{ "sub/page"|link }}`
        in Twig templates to declare internal links
* [New] Brand new plugin system with dependencies (see `PicoPluginInterface`
        and `AbstractPicoPlugin`); if you're plugin dev, you really should
        take a look at the UPGRADE section of the docs!
* [New] Introducing the `PicoDeprecated` plugin to maintain full backward
        compatibility with Pico 0.9 and Pico 0.8
* [New] Support YAML-style meta header comments (`---`)
* [New] Various new placeholders to use in content files (e.g. `%site_title%`)
* [New] Provide access to all meta headers in content files (`%meta.*%`)
* [New] Provide access to meta headers in `$page` arrays (`$page['meta']`)
* [New] The file extension of content files is now configurable
* [New] Add `Pico::setConfig()` method to predefine config variables
* [New] Supporting per-directory `404.md` files
* [New] #103: Providing access to `sub.md` even when the `sub` directory
        exists, provided that there is no `sub/index.md`
* [New] #249: Support the `.twig` file extension for templates
* [New] #268, 269: Now using Travis CI; performing basic code tests and
        implementing an automatic release process
* [Changed] Complete code refactoring
* [Changed] Source code now follows PSR code styling
* [Changed] Replacing constants (e.g. `ROOT_DIR`) with constructor parameters
* [Changed] Paths (e.g. `content_dir`) are now relative to Pico's root dir
* [Changed] Adding `Pico::run()` method that performs Pico's processing and
            returns the rendered contents
* [Changed] Renaming all plugin events; adding some new events
* [Changed] `Pico_Plugin` is now the fully documented `DummyPlugin`
* [Changed] Meta data must start on the first line of the file now
* [Changed] Dropping the need to register meta headers for the convenience of
            users and pure (!) theme devs; plugin devs are still REQUIRED to
            register their meta headers during `onMetaHeaders`
* [Changed] Exclude inaccessible files from pages list
* [Changed] With alphabetical order, index files (e.g. `sub/index.md`) are
            now always placed before their sub pages (e.g. `sub/foo.md`)
* [Changed] Pico requires PHP >= 5.3.6 (due to `erusev/parsedown-extra`)
* [Changed] Pico now implicitly uses a existing `content` directory without
            the need to configure this in the `config/config.php` explicitly
* [Changed] Composer: Require a v0.7 release of `erusev/parsedown-extra`
* [Changed] #93, #158: Pico doesn't parse all content files anymore; moved to
            `PicoParsePagesContent` plugin, but still impacts performance;
            Note: This means `$page['content']` isn't available anymore, but
            usually the new `$page['raw_content']` is suitable as replacement.
* [Changed] #116: Parse meta headers using the Symfony YAML component
* [Changed] #244: Replace opendir() with scandir()
* [Changed] #246: Move `config.php` to `config/` directory
* [Changed] #253: Assume HTTPS if page is requested through port 443
* [Changed] A vast number of small improvements and changes...
* [Fixed] Sorting by date now uses timestamps and works as expected
* [Fixed] Fixing `$currentPage`, `$nextPage` and `$previousPage`
* [Fixed] #99: Support content filenames with spaces
* [Fixed] #140, #241: Use file paths as page identifiers rather than titles
* [Fixed] #248: Always set a timezone; adding `$config['timezone']` option
* [Fixed] A vast number of small bugs...
* [Removed] Removing the default Twig cache dir
* [Removed] Removing various empty `index.html` files
* [Removed] Moving Pico's excerpt feature to `PicoExcerpt` plugin
```
2015-11-06 19:13:17 +01:00
Daniel Rudolf
2d6859af60 Update .travis.yml 2015-11-06 19:13:01 +01:00
Daniel Rudolf
e5b0ec6d7b Merge pull request #252 from PhrozenByte/pico1.0
Pico 1.0
2015-11-06 19:06:39 +01:00
Daniel Rudolf
cd1dc07d81 Sync docs 2015-11-06 17:50:22 +01:00
theshka
82cbe37009 fix typos 2015-11-06 10:15:28 -06:00