@shakedko
IF AN EXPERT SAYS IT CAN'T BE DONE GET ANOTHER EXPERT.
- DAVID BEN-GURION

Pelican pin post to top

Description

I have figured that sometimes I want to write a post while I would prefer to have other posts pinned to the top of the index page. I have written a new small plugin that does that.

Pelican logo with pin

The plugin can be found in my Github profile under the "Pin-to-top" repository

I have also added a pull request to the Pelican-plugin repository and hopefully it will be accepted later on.

Usage

Check out the plugin to your pelican's plugins directory

Edit your pelicanconf.py and set:

PLUGINS = ['pin_to_top']

In your post(s) meta data you can use:

Pin: true

Later you can also use it in your theme, for example you can use the glyphicon-pushpin:

<span>{% if article.pin %}<i class="glyphicon glyphicon-pushpin"></i>{% endif %}</span>

Example

A pinned post would have a small "pushpin" icon next to it, e.g:

Pelican pin to top example

Work In Progress 🚧
Discipline