Path Handlers for Nikola

Nikola supports special links with the syntax link://kind/­name. In the templates you can also use _link(kind, name) Here is the description for all the supported kinds.

archive

Link to ar­chive path, name is the year.

Ex­am­ple:

link://archive/2013 => /archives/2013/in­dex.html

archive_atom

Link to atom ar­chive path, name is the year.

Ex­am­ple:

link://archive_atom/2013 => /archives/2013/in­dex.atom

author

Link to an au­thor’s page.

Ex­am­ple:

link://au­thor/joe => /au­thors/joe.html

author_atom

Link to an au­thor’s Atom feed.

Ex­am­ple:

link://au­thor_atom/joe => /au­thors/joe.atom

author_index

Link to the au­thor’s in­dex.

Ex­am­ple:

link://au­thors/ => /au­thors/in­dex.html

author_rss

Link to an au­thor’s RSS feed.

Ex­am­ple:

link://au­thor_rss/joe => /au­thors/joe.rss

category

A link to a cat­e­go­ry.

Ex­am­ple:

link://­cat­e­go­ry/­dogs => /cat­e­gories/­dogs.html

category_atom

A link to a cat­e­go­ry’s Atom feed.

Ex­am­ple:

link://­cat­e­go­ry_atom/­dogs => /cat­e­gories/­dogs.atom

category_index

A link to the cat­e­go­ry in­dex.

Ex­am­ple:

link://­cat­e­go­ry_in­dex => /cat­e­gories/in­dex.html

category_rss

A link to a cat­e­go­ry’s RSS feed.

Ex­am­ple:

link://­cat­e­go­ry_rss/­dogs => /cat­e­gories/­dogs.xml

filename

Link to post or sto­ry by source file­name.

Ex­am­ple:

link://­file­name/­man­u­al.txt => /doc­s/hand­book.html

gallery

Link to an im­age gallery’s path.

It will try to find a gallery with that name if it’s not am­bigu­ous or with that path. For ex­am­ple:

link://­gallery/lon­don => /gal­leries/trip­s/lon­don/in­dex.html

link://­gallery/trip­s/lon­don => /gal­leries/trip­s/lon­don/in­dex.html

gallery_global

Link to the glob­al gallery path, which con­tains all the im­ages in gal­leries.

There is on­ly one copy of an im­age on mul­ti­lin­gual blogs, in the site root.

link://­gallery_­glob­al/lon­don => /gal­leries/trip­s/lon­don/in­dex.html

link://­gallery_­glob­al/trip­s/lon­don => /gal­leries/trip­s/lon­don/in­dex.html

(a gallery link could lead to eg. /en/galleries/trips/london/index.html)

gallery_rss

Link to an im­age gallery’s RSS feed.

It will try to find a gallery with that name if it’s not am­bigu­ous or with that path. For ex­am­ple:

link://­gallery_rss/lon­don => /gal­leries/trip­s/lon­don/rss.xml

link://­gallery_rss/trip­s/lon­don => /gal­leries/trip­s/lon­don/rss.xml

index

Link to a num­bered in­dex.

Ex­am­ple:

link://in­dex/3 => /in­dex-3.html

index_atom

Link to a num­bered Atom in­dex.

Ex­am­ple:

link://in­dex_atom/3 => /in­dex-3.atom

listing

A link to a list­ing.

It will try to use the file name if it’s not am­bigu­ous, or the file path.

Ex­am­ple:

link://list­ing/hel­lo.py => /list­ings/­tu­to­ri­al/hel­lo.py.html

link://list­ing/­tu­to­ri­al/hel­lo.py => /list­ings/­tu­to­ri­al/hel­lo.py.html

post_path

Link to the des­ti­na­tion of an el­e­ment in the POST­S/­PAGES set­tings.

Ex­am­ple:

link://­post_­path/­posts => /blog

root

Link to the cur­rent lan­guage’s root.

Ex­am­ple:

link://­root_­path => /

link://­root_­path => /trans­la­tion­s/s­pan­ish/

rss

A link to the RSS feed path.

Ex­am­ple:

link://rss => /blog/rss.xml

section_index

Link to the in­dex for a sec­tion.

Ex­am­ple:

link://­sec­tion_in­dex/­cars => /cars/in­dex.html

section_index_atom

Link to the Atom in­dex for a sec­tion.

Ex­am­ple:

link://­sec­tion_in­dex_atom/­cars => /cars/in­dex.atom

slug

A link to a post with giv­en slug, if not am­bigu­ous.

Ex­am­ple:

link://s­lug/yel­low-­ca­maro => /post­s/­cars/aw­ful/yel­low-­ca­maro/in­dex.html

tag

A link to a tag’s page.

Ex­am­ple:

link://­tag/­cats => /tags/­cat­s.html

tag_atom

A link to a tag’s Atom feed.

Ex­am­ple:

link://­tag_atom/­cats => /tags/­cat­s.atom

tag_index

A link to the tag in­dex.

Ex­am­ple:

link://­tag_in­dex => /tags/in­dex.html

tag_rss

A link to a tag’s RSS feed.

Ex­am­ple:

link://­tag_rss/­cats => /tags/­cat­s.xml