Add all stories in specified locations to the navigation bar.

To install, run nikola plugin -i navstories

This very simple plugin throws all the stories to the navigation bar.

Started as a Proof-of-concept of a ConfigPlugin. By request on the mailing list.

Changed to map the stories/pages to a hierachical structure in the menu based on the permalink structure (defaults to the directory structure of the posts).

This plugin generates menus and one level of submenus (further sub-levels are mapped to first level submenus). WARNING: Support for submenus is theme-dependent.

The menu entries inserted by navstories are inserted after entries from NAVIGATION_LINKS. Entries listed in NAVIGATION_LINKS_POST_NAVSTORIES are inserted after navstories entries.


To include stories in the menu the permalink for the story must start with one of the strings listed in NAVSTORIES_PATHS, other stories should be ignored by this pluging.

Sorting and display names in menu can be controlled for top-level entries via NAVSTORIES_MAPPING.

# Paths (permalink) that should be processed by navstories plugin (path starting with /<variable>/, <variable> can contain /, e.g.: stories/b
# Mapping "Toplevel in permalink" to "Visible text"
# The order is as listed here, entries not listed here are included in the end, with the top level of the permalink as text
        # example (remove initial #):
        #("b", "Boo"),
        #("f", "Foo"),
# Indention for each level deeper in a submenu, than the highest level in that submenu, the submenu is flat, so it is only the menu text there are indented
# Static menu after dynamic navstories menu entries
# Format just as NAVIGATION_LINKS, but content included after navstories entries

To exclude a single story from the navstories meny add the following metadata .. hidefromnav: yes to the story.

Issues? Questions?

You can report issues with this plugin and request help via GitHub Issues.