Daniel Rudolf
9a8b3da2ae
Simplify PHP class imports
3 years ago
Daniel Rudolf
a3f801b89a
Enable PHP strict typing
...
We can't enable strict typing everywhere without major BC breaks (likely Pico 4.0), so we're doing this on a best-effort basis.
Fixes #603
3 years ago
Daniel Rudolf
61880d150e
Update Pico::VERSION to '3.0.0-dev'
3 years ago
Daniel Rudolf
8b4b20fe97
PHP_CodeSniffer: Allow using strftime()
3 years ago
Daniel Rudolf
e33f6c8148
Update various links
3 years ago
Daniel Rudolf
76a761c3a2
Bump to API version 4
3 years ago
Daniel Rudolf
1b956afc29
Code cleanup
3 years ago
Daniel Rudolf
fe6c8f805a
Re-add deprecated Pico::getBaseThemeUrl() and AbstractPicoPlugin::__call()
...
This reverts commits efc4fb5288
and bc816febfc
3 years ago
Daniel Rudolf
41fc15a7e8
Remove picocms\Pico\ namespace
...
This reverts commit 812ae5c215
3 years ago
Daniel Rudolf
edfab74ff2
Add %page_*% replacements for Markdown files
...
`%page_id%` is replaced by the page's ID, `%page_url%` by the page's relative URL, and `%page_path%` by the dirname of page file.
3 years ago
Daniel Rudolf
888b910a84
Update Pico::VERSION
...
Pico::VERSION_ID isn't updated because this is a alpha release.
5 years ago
Daniel Rudolf
b95cfe0a0e
Update Pico::VERSION and Pico::VERSION_ID
5 years ago
Daniel Rudolf
1916dc5645
Silence PHP notices in upstream Parsedown
...
Parsedown is a still unresolved issue in whole, this at least ensures that we don't fill up logfiles with useless errors...
5 years ago
Daniel Rudolf
4be1f6ae90
Try to proberly encode formatted date strings returned by strftime()
...
Fixes #560
5 years ago
Daniel Rudolf
590d467347
Update Pico::VERSION and Pico::VERSION_ID
5 years ago
Daniel Willmann
b2df860546
Add option to set a locale
...
As mentioned in https://www.php.net/manual/en/function.basename.php both
basename() and dirname() are locale aware.
An incorrect locale can cause the page tree to behave in strange ways.
For example the structure
/über-uns
|-index.md
|-impressum.md
could lead to the page impressum not being a child of über-uns.
5 years ago
Daniel Rudolf
d6f9806b32
Replace substr()-based comparisons by substr_compare()
5 years ago
Daniel Rudolf
bc816febfc
Remove deprecated Pico::getBaseThemeUrl()
...
Use Pico::getConfig('themes_url') instead.
5 years ago
Daniel Rudolf
efc4fb5288
Remove deprecated AbstractPlugin::__call()
...
Use AbstractPlugin::getPico() instead (e.g. `->getPico()->getConfig('my_config')` instead of `->getConfig('my_config')`).
5 years ago
Daniel Rudolf
646aa355e5
Various small improvements
5 years ago
Daniel Rudolf
62aa4dbc7e
Check theme dir before trying to load theme
5 years ago
Daniel Rudolf
b892d6bb11
Update Pico::VERSION and Pico::VERSION_ID
5 years ago
Daniel Rudolf
85d7573020
Update to Symfony YAML 5.0 and Twig 3.0
...
Pico now requires PHP 7.2.5+
5 years ago
Daniel Rudolf
b1a58b9300
Update code styling to PHP 7.0+
...
This commit includes no functional changes.
5 years ago
Daniel Rudolf
812ae5c215
Move Pico to picocms\Pico\ namespace
5 years ago
Daniel Rudolf
2ee41e9a8d
Update Pico::VERSION and Pico::VERSION_ID
5 years ago
Daniel Rudolf
718b790b19
Kick-start development of Pico 3.0
5 years ago
Daniel Rudolf
6672fb2277
Update Pico::VERSION and Pico::VERSION_ID
6 years ago
Daniel Rudolf
447479d973
Test hidden page requests on page ID
...
Fixes #523
6 years ago
Daniel Rudolf
a87e40fbf0
Update Pico::VERSION
6 years ago
Daniel Rudolf
c99f3cbbdf
Update @version phpDoc class docs
6 years ago
Daniel Rudolf
29f2e95160
Update Pico::VERSION
6 years ago
Daniel Rudolf
e0415c8c1d
Mark Pico's content Twig variable as being safe
...
This no longer requires themes to output the `content` variable using `{{ content|raw }}`, theme developers can use `{{ content }}` as before.
6 years ago
Daniel Rudolf
2a23edde4e
Fix code formatting
6 years ago
Daniel Rudolf
23000af64e
Add $singleLine param to Twig markdown parser
...
This allows you to parse just a single line of Markdown, i.e. the parsed output won't include a HTML paragraph element.
6 years ago
Daniel Rudolf
be0812fb55
Mark Twig content filter as HTML safe
6 years ago
Daniel Rudolf
cb3bdd149f
Mark Twig markdown filter as HTML safe
6 years ago
Daniel Rudolf
d2573c5df5
Fix $this->config['twig_config'] handling in Pico::loadTheme()
6 years ago
Daniel Rudolf
1d5aba46af
Support content files with UTF-8 BOM
...
Resolves #461
6 years ago
Daniel Rudolf
87bcff1654
Various small improvements
6 years ago
Daniel Rudolf
6ffbbec689
Improve theme API version retrieval
6 years ago
Daniel Rudolf
87ced8c8bd
Improve phpDoc class docs
6 years ago
Daniel Rudolf
681ad27158
🎉 Add Twig pages function
...
This function should be used most of the time when dealing with Pico's pages array, as it allows one to easily traverse Pico's pages tree (see `Pico::getPageTree()`) to retrieve a subset of Pico's pages array in a very convenient and performant way.
6 years ago
Daniel Rudolf
b27b4f388a
🎉 Add Pico theme API versioning and add pico-theme.yml
...
- Add pico-theme.yml with a theme's API version, theme-specific default Twig config, registering theme-specific custom meta headers and defaults for Pico's `theme_config` config
- Add new `onThemeLoading(&$theme)` and `onThemeLoaded($theme, $themeApiVersion, &$themeConfig)` events
- Enable Twig autoescaping by default
6 years ago
Daniel Rudolf
c1113a780c
Fix @deprecated notice for Pico::getBaseThemeUrl() and AbstractPicoPlugin::__call()
6 years ago
Daniel Rudolf
cd3d3dcec5
Bump API version
...
Due to ad729a99c4
and 33117be981
6 years ago
Daniel Rudolf
17aba01513
Various small improvements
6 years ago
Daniel Rudolf
fd97c70502
Deprecated AbstractPicoPlugin::__call() in favour of PicoPluginInterface::getPico()
6 years ago
Daniel Rudolf
581a3a0609
Add AbstractPicoPlugin::configEnabled()
6 years ago
Daniel Rudolf
bbccb374de
phpDoc class docs: Use {@inheritDoc} in AbstractPicoPlugin
6 years ago