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
3480a520d9
Build system: Use PHP 5.3 to create pre-built release packages
...
Otherwise Composer downloads a newer version of Twig which isn't compatible with PHP 5.3. Since we don't pin down specific versions of our dependencies, Composer-based installations might use newer versions of Twig which aren't compatible with PHP 5.3. Raising the PHP requirements requires a new major version, something that will definitly happen with Pico 3.0.
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
9c00ac4191
Travis CI: Remove not-yet-released PHP 7.4
6 years ago
Daniel Rudolf
b088555d17
Create .github/FUNDING.yml
6 years ago
Daniel Rudolf
1d5aba46af
Support content files with UTF-8 BOM
...
Resolves #461
6 years ago
Daniel Rudolf
d95c9d3708
Add content-sample/theme.md
...
The purpose of `theme.md` is to aid theme development - on this page you'll find basically every format that is possible with Markdown. If you develop a theme, you should make sure that all examples below show decent. The page doesn't show up in the website's menu due to `hidden: true` in the page's YAML header.
6 years ago
Daniel Rudolf
87bcff1654
Various small improvements
6 years ago
Daniel Rudolf
e4e6f0f5f0
Merge branch 'master' into pico-2.1
...
Conflicts:
config/config.yml.template
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
7684fc455a
Improve index.php error message for a missing 'vendor/autoload.php'
6 years ago
Daniel Rudolf
92a8a299f8
Travis CI: Add PHP 7.4, improve deployment logging
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
Robbert
c99e3e639d
Fixed typo in config.yml ( #510 )
6 years ago
Daniel Rudolf
c1113a780c
Fix @deprecated notice for Pico::getBaseThemeUrl() and AbstractPicoPlugin::__call()
6 years ago
Daniel Rudolf
d0b637f686
Build system: Use PHP 5.6 for deployment due to broken phpDocumentor v2.9
...
phpDocumentor v3.0 (currently in alpha) is broken, too, generating class docs without a single working link
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
Daniel Rudolf
d72bc24ab3
Remove PicoPluginInterface::__construct()
...
It doesn't really matter how the current Pico instance is injected into the plugin unless PicoPluginInterface::getPico() is implemented
6 years ago
Daniel Rudolf
eca06a38a9
phpDoc class docs: Remove superflous @return void
6 years ago
Daniel Rudolf
56659ab95d
Build system: Don't use Composer for dev dependencies
...
PHP_CodeSniffer and phpDocumentor are external tools which should never affect Pico's environment, thus we rather use PHARs in the future.
6 years ago
TheTechRobo
b1ec1e55e1
Update README.md ( #507 )
6 years ago
Daniel Rudolf
6e6d80c044
Add Pico::substituteUrl() and `url` Twig filter
...
Allows theme developers and users to use URL placeholders like `%base_url%` in meta headers, e.g. to include images.
6 years ago
Daniel Rudolf
715cb83431
Improve class docs of Pico::getBaseThemeUrl() and Pico::getUrlFromPath()
6 years ago
Daniel Rudolf
8d6e9ac31e
Replace file_exists() by is_file()
6 years ago
Daniel Rudolf
641cae849b
Travis CI: Additionally create .zip release archives
6 years ago
Daniel Rudolf
c9a3f84673
Sync config/config.yml.template with Pico::loadConfig()
6 years ago
Daniel Rudolf
8c8c6e33f7
composer.json: Remove 3.0.x-dev alias
6 years ago
Daniel Rudolf
6476d6507d
Re-add deprecated Pico::getBaseThemeUrl() to maintain BC
6 years ago
Daniel Rudolf
ae82c16369
composer.json: Add 2.1.x-dev alias for pico-2.1 branch
6 years ago
Daniel Rudolf
3eab6c58d0
Bump version to 2.1.0-nightly
6 years ago
Daniel Rudolf
f3b5a92247
Fix directory separator in Pico::getUrlFromPath()
6 years ago
Daniel Rudolf
ad729a99c4
Remove base_dir and theme_dir Twig variables
...
These variables aren't really needed in Twig and can still be accessed using $config
6 years ago
Daniel Rudolf
33117be981
Config: Rename theme_url to themes_url, add plugins_url, assets_url and assets_dir
6 years ago
Daniel Rudolf
38bb0a4ac7
Various small improvements
6 years ago
Daniel Rudolf
bb1b8639bd
Add Pico::getUrlFromPath() and Pico::getAbsoluteUrl(), replacing Pico::getBaseThemeUrl()
6 years ago
Daniel Rudolf
f016c8a937
Add Pico::getNormalizedPath()
6 years ago
Daniel Rudolf
8ce3b0c224
Add debug mode
...
You can enable Pico's debug mode by setting the PICO_DEBUG environment variable. At the moment this just enables Twig's debug mode.
6 years ago
Daniel Rudolf
edf849725d
Config template: Add more Twig config options
6 years ago
Daniel Rudolf
008ca6f41b
Pico::loadConfig(): Make twig cache path absolute
6 years ago
Daniel Rudolf
c91518a7c8
composer.json: Update Parsedown Extra 0.8 and Parsedown 1.8 version constraints
6 years ago