Panel dashboard widget displaying all unpublished pages for Kirby.
If you are using the Kirby CLI you can install this plugin by running the following command in your shell from the root folder of your Kirby installation:
kirby plugin:install Thiousi/kirby-drafts-widget
Download this archive, extract it and rename it to drafts-widget
. Copy the folder to your site/plugins
folder.
If you know your way around git, you can download this as a submodule:
$ git submodule add https://github.com/Thiousi/kirby-drafts-widget site/plugins/drafts-widget
You don't have anything to do once the widget is installed. The widget has two states:
The following options can be set in your /site/config/config.php
file:
/* Drafts widget */
c::set('plugin.drafts.widget.exclude', array('error'));
c::set('plugin.drafts.widget.nodrafts', 'No drafts... Start writing today!');
This option is an array of pages that will be excluded from the drafts widget. Add pages after 'error', separated by a comma, and between single quotes
This option is a string, which is displayed instead of the list of drafts when there are no drafts.
- Internationalize widget? Already ok for draft names, only message is not internationalized
-
Get list of excluded pages from configuration instead of widget code -
Update readme -
Make it CLI and submodule compatible
This plugin was created as part of writing up a tutorial on macotuts: https://macotuts.com/tuto/medium/creating-first-widget
MIT
- Initialial release
- Made CLI compatible
- Made Submodule compatible
- Enhanced Readme
- Updated screenshots
- Fixed compressed headline and spacing issues
- Text now set in configuration
- List of excluded pages now set in configuration
- Readme enhanced with options