Skip to content

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

License

Notifications You must be signed in to change notification settings

akhayyat/pelican-page-order

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Page Order

Author: Ahmad Khayyat ([email protected])

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.

License

Licence: BSD. See included LICENSE file.

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages