aboutsummaryrefslogtreecommitdiffstats
path: root/docs/path_handlers.txt
diff options
context:
space:
mode:
authorLibravatarDererk <dererk@satellogic.com>2016-11-15 14:18:53 -0300
committerLibravatarDererk <dererk@satellogic.com>2016-11-15 14:18:53 -0300
commit1ad5102b7ddd181bb9c632b124d3ea4c7db28be6 (patch)
tree73dda18465d0f4b8eb52d4482282a387c9f67c95 /docs/path_handlers.txt
parentb67294f76809a681ff73f209ed691a3e3f00563d (diff)
parentffb671c61a24a9086343b54bad080e145ff33fc5 (diff)
Merge tag 'upstream/7.8.1'
Upstream version 7.8.1 # gpg: Firmado el mar 15 nov 2016 14:18:48 ART # gpg: usando RSA clave A6C7B88B9583046A11C5403E0B00FB6CEBE2D002 # gpg: Firma correcta de "Ulises Vitulli <dererk@debian.org>" [absoluta] # gpg: alias "Dererk <dererk@torproject.org>" [absoluta] # gpg: alias "Ulises Vitulli <uvitulli@fi.uba.ar>" [absoluta] # gpg: alias "Ulises Vitulli <dererk@satellogic.com>" [absoluta]
Diffstat (limited to 'docs/path_handlers.txt')
-rw-r--r--docs/path_handlers.txt261
1 files changed, 261 insertions, 0 deletions
diff --git a/docs/path_handlers.txt b/docs/path_handlers.txt
new file mode 100644
index 0000000..2a03d77
--- /dev/null
+++ b/docs/path_handlers.txt
@@ -0,0 +1,261 @@
+.. title: Path Handlers for Nikola
+.. slug: path-handlers
+.. author: The Nikola Team
+
+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.
+
+.. class:: dl-horizontal
+
+archive
+ Link to archive path, name is the year.
+
+ Example:
+
+ link://archive/2013 => /archives/2013/index.html
+
+
+archive_atom
+ Link to atom archive path, name is the year.
+
+ Example:
+
+ link://archive_atom/2013 => /archives/2013/index.atom
+
+
+author
+ Link to an author's page.
+
+ Example:
+
+ link://author/joe => /authors/joe.html
+
+
+author_atom
+ Link to an author's Atom feed.
+
+ Example:
+
+ link://author_atom/joe => /authors/joe.atom
+
+
+author_index
+ Link to the author's index.
+
+ Example:
+
+ link://authors/ => /authors/index.html
+
+
+author_rss
+ Link to an author's RSS feed.
+
+ Example:
+
+ link://author_rss/joe => /authors/joe.rss
+
+
+category
+ A link to a category.
+
+ Example:
+
+ link://category/dogs => /categories/dogs.html
+
+
+category_atom
+ A link to a category's Atom feed.
+
+ Example:
+
+ link://category_atom/dogs => /categories/dogs.atom
+
+
+category_index
+ A link to the category index.
+
+ Example:
+
+ link://category_index => /categories/index.html
+
+
+category_rss
+ A link to a category's RSS feed.
+
+ Example:
+
+ link://category_rss/dogs => /categories/dogs.xml
+
+
+filename
+ Link to post or page by source filename.
+
+ Example:
+
+ link://filename/manual.txt => /docs/handbook.html
+
+
+gallery
+ Link to an image gallery's path.
+
+ It will try to find a gallery with that name if it's not ambiguous
+ or with that path. For example:
+
+ link://gallery/london => /galleries/trips/london/index.html
+
+ link://gallery/trips/london => /galleries/trips/london/index.html
+
+
+gallery_global
+ Link to the global gallery path, which contains all the images in galleries.
+
+ There is only one copy of an image on multilingual blogs, in the site root.
+
+ link://gallery_global/london => /galleries/trips/london/index.html
+
+ link://gallery_global/trips/london => /galleries/trips/london/index.html
+
+ (a ``gallery`` link could lead to eg. /en/galleries/trips/london/index.html)
+
+
+gallery_rss
+ Link to an image gallery's RSS feed.
+
+ It will try to find a gallery with that name if it's not ambiguous
+ or with that path. For example:
+
+ link://gallery_rss/london => /galleries/trips/london/rss.xml
+
+ link://gallery_rss/trips/london => /galleries/trips/london/rss.xml
+
+
+index
+ Link to a numbered index.
+
+ Example:
+
+ link://index/3 => /index-3.html
+
+
+index_atom
+ Link to a numbered Atom index.
+
+ Example:
+
+ link://index_atom/3 => /index-3.atom
+
+
+listing
+ A link to a listing.
+
+ It will try to use the file name if it's not ambiguous, or the file path.
+
+ Example:
+
+ link://listing/hello.py => /listings/tutorial/hello.py.html
+
+ link://listing/tutorial/hello.py => /listings/tutorial/hello.py.html
+
+
+listing_source
+ A link to the source code for a listing.
+
+ It will try to use the file name if it's not ambiguous, or the file path.
+
+ Example:
+
+ link://listing_source/hello.py => /listings/tutorial/hello.py
+
+ link://listing_source/tutorial/hello.py => /listings/tutorial/hello.py
+
+
+post_path
+ Link to the destination of an element in the POSTS/PAGES settings.
+
+ Example:
+
+ link://post_path/posts => /blog
+
+
+root
+ Link to the current language's root.
+
+ Example:
+
+ link://root_path => /
+
+ link://root_path => /translations/spanish/
+
+
+rss
+ A link to the RSS feed path.
+
+ Example:
+
+ link://rss => /blog/rss.xml
+
+
+section_index
+ Link to the index for a section.
+
+ Example:
+
+ link://section_index/cars => /cars/index.html
+
+
+section_index_atom
+ Link to the Atom index for a section.
+
+ Example:
+
+ link://section_index_atom/cars => /cars/index.atom
+
+
+section_index_rss
+ Link to the RSS feed for a section.
+
+ Example:
+
+ link://section_index_rss/cars => /cars/rss.xml
+
+
+slug
+ A link to a post with given slug, if not ambiguous.
+
+ Example:
+
+ link://slug/yellow-camaro => /posts/cars/awful/yellow-camaro/index.html
+
+
+tag
+ A link to a tag's page.
+
+ Example:
+
+ link://tag/cats => /tags/cats.html
+
+
+tag_atom
+ A link to a tag's Atom feed.
+
+ Example:
+
+ link://tag_atom/cats => /tags/cats.atom
+
+
+tag_index
+ A link to the tag index.
+
+ Example:
+
+ link://tag_index => /tags/index.html
+
+
+tag_rss
+ A link to a tag's RSS feed.
+
+ Example:
+
+ link://tag_rss/cats => /tags/cats.xml
+
+