Giter VIP home page Giter VIP logo

kirby-drafts-widget's Introduction

Kirby Drafts Widget

Kirby Drafts Widget logo

Version License Kirby Version

Panel dashboard widget displaying all unpublished pages for Kirby.

Kirby Drafts Widget screenshot

Installation

1. Kirby CLI

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

2. Manual

Download this archive, extract it and rename it to drafts-widget. Copy the folder to your site/plugins folder.

3. Git Submodule

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

Usage

You don't have anything to do once the widget is installed. The widget has two states:

1. No drafts to display

Kirby Drafts Widget no drafts

2. Drafts to display

Kirby Drafts Widget unpublished

Options

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!');

plugin.drafts.widget.exclude

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

plugin.drafts.widget.nodrafts

This option is a string, which is displayed instead of the list of drafts when there are no drafts.

To-do

  • 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

Credits

This plugin was created as part of writing up a tutorial on macotuts: https://macotuts.com/tuto/medium/creating-first-widget

License

MIT

Changelog

1.0.0

  • Initialial release

1.1.0

  • Made CLI compatible
  • Made Submodule compatible
  • Enhanced Readme
  • Updated screenshots
  • Fixed compressed headline and spacing issues

1.2.0

  • Text now set in configuration
  • List of excluded pages now set in configuration
  • Readme enhanced with options

kirby-drafts-widget's People

Contributors

thiousi avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.