Commit graph

803 commits

Author SHA1 Message Date
Daniel Rudolf de74e7d867
Improve class docs 2017-07-14 20:50:38 +02:00
Daniel Rudolf 414f5ac18e
Allow pages to be sorted by arbitrary meta values
This basically works like Pico's `sort_by` Twig filter
2017-07-14 20:37:05 +02:00
Daniel Rudolf b626782b87
Use Pico::substituteFileContent() for Twig's "markdown" filter 2017-06-21 14:27:50 +02:00
Daniel Rudolf 55a0a5bc91
Add Pico::substituteFileContent() method 2017-06-21 14:27:34 +02:00
Daniel Rudolf df532e45bb
Travis CI: Use Build Stages
See https://docs.travis-ci.com/user/build-stages
2017-06-21 02:26:44 +02:00
Daniel Rudolf 05c8d95b3f
Only load Twig_Extension_Debug when Twig's debug mode is enabled 2017-06-20 23:34:07 +02:00
Daniel Rudolf 4cd993c50a
Fix PHP Syntax Error 2017-06-20 18:02:32 +02:00
Daniel Rudolf fd78ec38c7
Various small improvements 2017-06-20 17:32:09 +02:00
Daniel Rudolf 793fcdb4e1
Add "remove" fallback to Twig's "sort_by" filter 2017-06-20 17:31:49 +02:00
Daniel Rudolf 21051fe08b
Pico::loadComposerPlugins(): Use Pico::getVendorDir() instead of Pico::$vendorDir 2017-06-14 17:43:40 +02:00
Daniel Rudolf 23ad80b98a
Let Pico load plugins from vendor/pico-plugin.php
Split the Pico::loadPlugins() method to Pico::loadLocalPlugins() and Pico::loadComposerPlugins()
2017-06-14 17:10:42 +02:00
Daniel Rudolf 91771e67af
Update .htaccess 2017-06-14 12:03:30 +02:00
Daniel Rudolf 66cc087b6e
Travis CI: Explicitly set root package version for branches
Due to the fact that Travis uses a shallow clone of Pico's Git repo, composer has no chance to detect on which branch it currently is. This was no big deal with Pico 1.0, however, Pico 2.0 depends on picocms/pico-deprecated and picocms/pico-theme. We use composer's `self.version` version constraint to sync the version numbers of these separate Git repos. Thus composer must know Pico's current version to resolve these dependencies. We try to guess the current version either using known branch aliases in Pico's `composer.json`, or using the `Pico::VERSION` constant (see `_build/install.sh`).
2017-06-14 02:11:32 +02:00
Daniel Rudolf 989d080eb8
README.md: Explicitly use master branch for Travis badge 2017-06-12 21:49:57 +02:00
Daniel Rudolf 31310429fb
Merge branch 'master' into pico-1.1 2017-06-12 20:21:28 +02:00
Daniel Rudolf 66916f62bc
Travis CI: Upgrade to Ubuntu Trusty for HHVM support
However, Ubuntu Trusty doesn't support PHP 5.3, so we'll have to continue using Ubuntu Precise for PHP 5.3
2017-06-12 20:11:04 +02:00
Daniel Rudolf cd2cc60ef6
Sync versions of pico-deprecated and pico-theme with Pico
... by using composer's special version constraint "self.version"
2017-06-12 19:36:49 +02:00
Daniel Rudolf f0b42cf364
Add explicit dependencies to the PHP extensions "dom" and "mbstring"
Pico doesn't require the PHP extensions itself, but erusev/parsedown-extra does. The explicit composer.json requirements are necessary until erusev/parsedown-extra#85 gets merged. Both extensions aren't part of Ubuntu's default LAMP setup anymore.
2017-05-26 21:52:38 +02:00
Daniel Rudolf 3d16c8df16 Merge pull request #384 from picocms/enhancement/contributing2
CONTRIBUTING.md: Create "Labelling of Issues & Pull-Requests" section (2)
2017-05-17 23:51:11 +02:00
Daniel Rudolf 2fb7125985
Add "Labeling of Issues & Pull Requests" section to CONTRIBUTING.md 2017-05-14 15:01:11 +02:00
Daniel Rudolf b098e22033
Various small improvements 2017-05-14 01:26:38 +02:00
Daniel Rudolf d26da62bf1
Add onSinglePageContent event 2017-05-14 01:26:29 +02:00
Daniel Rudolf 773f4795f7
Remove Pico::registerTwig(), use Pico::getTwig() instead 2017-05-14 01:26:07 +02:00
Daniel Rudolf 80c88f2a7d
Refactor onMetaHeaders event 2017-05-14 01:25:10 +02:00
Daniel Rudolf f4332a247c
Force PicoDeprecated to be first plugin in the plugins array 2017-05-14 01:11:16 +02:00
Daniel Rudolf 624310bbe7
Various small improvements 2017-05-13 18:17:58 +02:00
Daniel Rudolf 191f6edbe9
Don't pass the $plugins argument of the onPluginsLoaded event by reference
This is a BC breaking change!

Manipulating Pico's $plugins array is a really bad idea. We've introduced the Pico::loadPlugin() method to safely load plugins at any time, however, Pico might do unexpected things when loading plugins too late. See the class docs of Pico::loadPlugin() for more details. Nevertheless, this change breaks BC to Pico 1.0. However, I don't know a single plugin that relies on manipulating the $plugins array. If you just want to load a plugin manually, use Pico::loadPlugin() instead.
2017-05-13 18:17:19 +02:00
Daniel Rudolf 6e28a51080
Refactor onPages… and onPage… core events
Add new onPagesDiscovered event passing the unsorted pages array, move the $currentPage, $previousPage and $nextPage arguments from the onPagesLoaded event to the new onCurrentPageDiscovered event, remove the $twig argument from the onPageRendering event and rather trigger the new onTwigRegistered event for this. Also add the new onYamlParserRegistered and onParsedownRegistered events passing the YAML parser resp. the Parsedown instance. Allow plugin's to skip a page by setting the $id argument of the onSinglePageLoading event to NULL.
2017-05-13 18:08:54 +02:00
Daniel Rudolf 7b222b03e4
Add Pico::API_VERSION 2017-05-10 17:00:48 +02:00
Daniel Rudolf 36b3aef1c7
Fix Pico::loadPlugin() when called before Pico::loadPlugins() 2017-05-07 14:20:44 +02:00
Daniel Rudolf e8e60f49e5
Update DummyPlugin 2017-05-07 14:15:24 +02:00
Daniel Rudolf 6574d482cc
Update .gitattributes 2017-05-06 20:34:26 +02:00
Daniel Rudolf 8a11a65c9f
Create distinct _build/.gitignore 2017-05-06 19:34:58 +02:00
Daniel Rudolf aaf52dd36c
Create empty assets/ dir
Thanks @smcdougall, see 3f98896165 (commitcomment-22043296)
2017-05-06 19:28:33 +02:00
Daniel Rudolf a8956b72bc
Version 1.0.5
```
* [Changed] Improve documentation
* [Fixed] Improve hostname detection with proxies
* [Fixed] Fix detection of Windows-based server environments
* [Removed] Remove Twitter links
```
2017-05-02 00:47:22 +02:00
Daniel Rudolf 4d1f92a1f2
Update CONTRIBUTING.md 2017-05-02 00:35:48 +02:00
Daniel Rudolf 3f98896165
Create empty content/ dir 2017-05-02 00:26:23 +02:00
Daniel Rudolf 1d73524e41
Search for content/index.md to determine the content dir to use 2017-05-02 00:22:35 +02:00
Daniel Rudolf bba93752cb
Use dev dependencies for pico-deprecated and pico-theme 2017-05-01 23:46:10 +02:00
Daniel Rudolf a114821466
Add 2.0-dev branch alias to composer.json 2017-05-01 23:34:57 +02:00
Daniel Rudolf f52e3dc890
Add Pico::getVendorDir()
The vendor directory is the installation path of the `picocms/Pico` package. If `picocms/Pico` is the composer root package (as in pre-bundled releases), it should be identical to `Pico::getRootDir()`. However, if `picocms/Pico` was installed as composer dependency (e.g. by `picocms/pico-composer`), the vendor directory usually corresponds to something like `Pico::getRootDir() . "vendor/picocms/pico"`. The vendor directory is currently only used as a last resort to load Pico's sample contents.
2017-05-01 22:27:57 +02:00
Daniel Rudolf cbb8ece579
Move PicoDeprecated plugin and default theme to separate repos
See https://github.com/picocms/pico-theme for Pico's default theme and https://github.com/picocms/pico-deprecated for the PicoDeprecated plugin.
2017-05-01 22:12:18 +02:00
Daniel Rudolf a39bc38620
Update keywords in composer.json; Use screenshot from website in README.md 2017-05-01 20:39:11 +02:00
Daniel Rudolf 3f17a2e28e
Merge branch 'master' into pico-1.1
Conflicts:
	content-sample/index.md
	themes/default/font/fontello.eot
	themes/default/font/fontello.svg
	themes/default/font/fontello.ttf
	themes/default/font/fontello.woff
	themes/default/font/fontello.woff2
	themes/default/fontello.css
2017-05-01 20:38:03 +02:00
Daniel Rudolf 82a342ba44
Various small improvements 2017-05-01 15:12:13 +02:00
Daniel Rudolf c69dca0f8c
Remove Twitter links
Our Twitter account is basically abandoned. Our key asset never was a hardly to subdue flood of words anyway 😆
2017-03-17 00:45:34 +01:00
Daniel Rudolf a2d0d745ff
Fix detection of Windows-based server environments 2017-02-19 23:43:43 +01:00
Daniel Rudolf 25468dc334
Update CHANGELOG.md 2017-02-19 23:43:02 +01:00
Daniel Rudolf 921b95181b
Add Bountysource to README.md 2017-02-19 23:41:42 +01:00
Daniel Rudolf 56fffe9ac2
Add Bountysource to default contents and README.md 2017-02-19 23:41:33 +01:00