Path Handlers for Nikola

Ni­ko­la sup­ports spe­cial links with the syn­tax link://­­kind/­­name. In the tem­plates you can al­so use _link(­kind, na­me) Here is the des­crip­tion for all the sup­por­ted kind­s.

archive

Link to ar­chive pa­th, name is the year.

Exam­ple:

link://ar­chi­ve/2013 => /ar­chi­ves/2013/in­dex.html

archive_atom

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

Exam­ple:

link://ar­chi­ve_a­tom/2013 => /ar­chi­ves/2013/in­dex.atom

author

Link to an au­thor’s page.

Exam­ple:

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

author_atom

Link to an au­thor’s Atom feed.

Exam­ple:

link://au­thor_a­tom/­joe => /au­thors/­joe.atom

author_index

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

Exam­ple:

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

author_rss

Link to an au­thor’s RSS feed.

Exam­ple:

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

category

A link to a ca­te­go­ry.

Exam­ple:

link://­ca­te­go­ry/­dogs => /ca­te­go­ries/­dog­s.html

category_atom

A link to a ca­te­go­ry’s Atom feed.

Exam­ple:

link://­ca­te­go­ry_a­tom/­dogs => /ca­te­go­ries/­dog­s.atom

category_index

A link to the ca­te­go­ry in­dex.

Exam­ple:

link://­ca­te­go­ry_in­dex => /ca­te­go­ries/in­dex.html

category_rss

A link to a ca­te­go­ry’s RSS feed.

Exam­ple:

link://­ca­te­go­ry_rss/­dogs => /ca­te­go­ries/­dog­s.xml

filename

Link to post or sto­ry by source fi­le­name.

Exam­ple:

link://­fi­le­na­me/­ma­nual.txt => /docs/­hand­book.html

gallery

Link to an image gal­le­ry’s path.

It will try to find a gal­le­ry with that name if it’s not am­bi­guous or with that path. For exam­ple:

link://­gal­le­ry/­lon­don => /gal­le­ries/­trips/­lon­don/in­dex.html

link://­gal­le­ry/­trips/­lon­don => /gal­le­ries/­trips/­lon­don/in­dex.html

gallery_global

Link to the glo­bal gal­le­ry pa­th, which contains all the images in gal­le­ries.

There is on­ly one co­py of an image on mul­ti­lin­gual blog­s, in the site root.

link://­gal­le­ry_­glo­bal/­lon­don => /gal­le­ries/­trips/­lon­don/in­dex.html

link://­gal­le­ry_­glo­bal/­trips/­lon­don => /gal­le­ries/­trips/­lon­don/in­dex.html

(a gal­le­ry link could lead to eg. /en/­gal­le­ries/­trips/­lon­don/in­dex.html)

gallery_rss

Link to an image gal­le­ry’s RSS feed.

It will try to find a gal­le­ry with that name if it’s not am­bi­guous or with that path. For exam­ple:

link://­gal­le­ry_rss/­lon­don => /gal­le­ries/­trips/­lon­don/rss.xml

link://­gal­le­ry_rss/­trips/­lon­don => /gal­le­ries/­trips/­lon­don/rss.xml

index

Link to a num­be­red in­dex.

Exam­ple:

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

index_atom

Link to a num­be­red Atom in­dex.

Exam­ple:

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

listing

A link to a lis­ting.

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

Exam­ple:

link://­lis­ting/­hel­lo.­py => /lis­ting­s/­tu­to­rial/­hel­lo.­py.html

link://­lis­ting/­tu­to­rial/­hel­lo.­py => /lis­ting­s/­tu­to­rial/­hel­lo.­py.html

post_path

Link to the des­ti­na­tion of an ele­ment in the POST­S/­PAGES set­ting­s.

Exam­ple:

link://­post_­pa­th/­posts => /blog

root

Link to the cur­rent lan­gua­ge’s root.

Exam­ple:

link://­root_­path => /

link://­root_­path => /trans­la­tions/s­pa­ni­sh/

rss

A link to the RSS feed path.

Exam­ple:

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

section_index

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

Exam­ple:

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

section_index_atom

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

Exam­ple:

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

slug

A link to a post with gi­ven slug, if not am­bi­guous.

Exam­ple:

link://s­lug/yel­low-­ca­ma­ro => /posts/­cars/aw­ful/yel­low-­ca­ma­ro/in­dex.html

tag

A link to a tag’s page.

Exam­ple:

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

tag_atom

A link to a tag’s Atom feed.

Exam­ple:

link://­tag_a­tom/­cats => /tag­s/­cats.atom

tag_index

A link to the tag in­dex.

Exam­ple:

link://­tag_in­dex => /tag­s/in­dex.html

tag_rss

A link to a tag’s RSS feed.

Exam­ple:

link://­tag_rss/­cats => /tag­s/­cats.xml