Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/PhrozenByte/pico-excerpt
This is Pico's official plugin to create page excerpts. Pico is a stupidly simple, blazing fast, flat file CMS.
https://github.com/PhrozenByte/pico-excerpt
abandoned deprecated excerpts pico pico-excerpt picocms picocms-plugin
Last synced: 11 days ago
JSON representation
This is Pico's official plugin to create page excerpts. Pico is a stupidly simple, blazing fast, flat file CMS.
- Host: GitHub
- URL: https://github.com/PhrozenByte/pico-excerpt
- Owner: PhrozenByte
- License: mit
- Created: 2018-06-24T17:46:18.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-06-24T21:29:18.000Z (over 6 years ago)
- Last Synced: 2024-10-07T23:40:55.248Z (about 1 month ago)
- Topics: abandoned, deprecated, excerpts, pico, pico-excerpt, picocms, picocms-plugin
- Language: PHP
- Homepage: http://picocms.org/
- Size: 6.84 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-blazingly-fast - pico-excerpt - This is Pico's official plugin to create page excerpts. Pico is a stupidly simple, blazing fast, flat file CMS. (PHP)
README
Pico Excerpt
============This is the repository of Pico's official `PicoExcerpt` plugin.
Pico is a stupidly simple, blazing fast, flat file CMS. See http://picocms.org/ for more info.
**This plugin exists for historic reasons only and should not be used!**
`PicoExcerpt` is a simple plugin that creates excperts of all your pages and makes them available using `{{ page.excerpt }}`. Installing this plugin is **highly discouraged**, because it depends on Pico's official [`PicoParsePagesContent` plugin][PicoParsePagesContent], that has a significant negative impact on your website's performance.
The main reason Pico started parsing the Markdown contents of all pages (see `PicoParsePagesContent`), was the desire for automatically generated page excerpts. We later realized that this is the wrong approach and started searching for alternatives - and we think we found a better solution. We recommend to part from the concept of automatically generated excerpts. Instead, you should use the `Description` meta header to write excerpts on your own. Starting with Pico 1.0 you can use `%meta.*%` placeholders in your Markdown files, so you don't have to repeat yourself - simply add `%meta.description%` to the page content and Pico will replace it with your excerpt.
By popular request we removed parsing the Markdown contents of all pages with Pico 1.0. This significantly improved Pico's performance. To preserve backwards compatibility (BC) we introduced the `PicoParsePagesContent` and `PicoExcerpt` plugins. Both plugins have been removed from Pico's default installation with Pico 2.0, but you can still install them manually.
Install
-------If you're using a `composer`-based installation of Pico (e.g. [`picocms/pico-composer`][PicoComposer]), simply open a shell on your server, navigate to Pico's install directory (e.g. `/var/www/html`) and run `composer require phrozenbyte/pico-excerpt` (via [Packagist.org][]). That's it!
If you're rather using one of [Pico's pre-built release packages][PicoRelease], you must install the [`PicoParsePagesContent` plugin][PicoParsePagesContent] first. After you've installed `PicoParsePagesContent`, create a empty `plugins/PicoExcerpt` directory in Pico's install directory (e.g. `/var/www/html`) on your server. Then download [`PicoExcerpt`'s latest source package][PicoPluginRelease] and upload all containing files (esp. `PicoExcerpt.php`) into said `plugins/PicoExcerpt` directory (resulting in `plugins/PicoExcerpt/PicoExcerpt.php`).
`PicoExcerpt` requires Pico 1.0+
Config
------`PicoExcerpt` is disabled by default due to the significant negative performance impact of the required `PicoParsePagesContent` plugin. You can enable the plugin by adding the following to your `config/config.yml`:
```yml
PicoExcerpt.enabled: true
````PicoExcerpt` itself has no config options.
[PicoComposer]: https://github.com/picocms/pico-composer
[Packagist.org]: https://packagist.org/packages/phrozenbyte/pico-excerpt
[PicoRelease]: https://github.com/picocms/Pico/releases/latest
[PicoPluginRelease]: https://github.com/PhrozenByte/pico-excerpt/releases/latest
[PicoParsePagesContent]: https://github.com/PhrozenByte/pico-parse-pages-content