Skip to content

A Pelican plugin that adds a page_order attribute to all pages if one is not defined.

Notifications You must be signed in to change notification settings

NLnetLabs/pelican-page-order

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Page Order

Author: Ahmad Khayyat (akhayyat@gmail.com)

A Pelican plugin that adds a page_order attribute to all pages if one is not defined. Allows your templates to sort pages as follows:

{% for p in PAGES|sort(attribute='page_order') %}

Without this plugin, to be able to use the line above in your templates, you would have to define the page_order attribute in all pages. This plugin sets the value of this attribute to a default value of 100, unless a DEFAULT_PAGE_ORDER setting is defined.

The page_order attribute is cast to an int, so only use numeric values. This is to have a value of 11 be greater than 2.

About

A Pelican plugin that adds a page_order attribute to all pages if one is not defined.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%