123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151 |
- <!-- DO NOT EDIT, this file is auto-generated by scripts/document_path_handlers.py -->
- <p>Nikola supports special links with the syntax <code class="docutils literal"><span class="pre">link://kind/name</span></code>. In
- templates you can also use <code class="docutils literal">_link(kind, name)</code>. You can add query strings
- (<code class="docutils literal"><span class="pre">?key=value</span></code>) for extra arguments, or pass keyword arguments to <code class="docutils literal">_link</code> in
- templates (support and behavior depends on path handlers themselves). Fragments
- (<code class="docutils literal">#anchor</code>) will be appended to the transformed link.</p>
- <p>Here are the descriptions for all the supported kinds.</p>
- <dl class="dl-horizontal">
- <dt>archive</dt>
- <dd><p>Link to archive path, name is the year.</p>
- <p>Example:</p>
- <p>link://archive/2013 => /archives/2013/index.html</p>
- </dd>
- <dt>author</dt>
- <dd><p>Link to an author's page.</p>
- <p>Example:</p>
- <p>link://author/joe => /authors/joe.html</p>
- </dd>
- <dt>author_atom</dt>
- <dd><p>Link to an author's Atom feed.</p>
- <p>Example:</p>
- <p>link://author_atom/joe => /authors/joe.atom</p>
- </dd>
- <dt>author_index</dt>
- <dd><p>Link to the authors index.</p>
- <p>Example:</p>
- <p>link://authors/ => /authors/index.html</p>
- </dd>
- <dt>author_rss</dt>
- <dd><p>Link to an author's RSS feed.</p>
- <p>Example:</p>
- <p>link://author_rss/joe => /authors/joe.xml</p>
- </dd>
- <dt>category</dt>
- <dd><p>A link to a category. Takes page number as optional keyword argument.</p>
- <p>Example:</p>
- <p>link://category/dogs => /categories/dogs.html</p>
- </dd>
- <dt>category_atom</dt>
- <dd><p>A link to a category's Atom feed.</p>
- <p>Example:</p>
- <p>link://category_atom/dogs => /categories/dogs.atom</p>
- </dd>
- <dt>category_index</dt>
- <dd><p>A link to the category index.</p>
- <p>Example:</p>
- <p>link://category_index => /categories/index.html</p>
- </dd>
- <dt>category_rss</dt>
- <dd><p>A link to a category's RSS feed.</p>
- <p>Example:</p>
- <p>link://category_rss/dogs => /categories/dogs.xml</p>
- </dd>
- <dt>filename</dt>
- <dd><p>Link to post or page by source filename.</p>
- <p>Example:</p>
- <p>link://filename/manual.txt => /docs/handbook.html</p>
- </dd>
- <dt>gallery</dt>
- <dd><p>Link to an image gallery's path.</p>
- <p>It will try to find a gallery with that name if it's not ambiguous
- or with that path. For example:</p>
- <p>link://gallery/london => /galleries/trips/london/index.html</p>
- <p>link://gallery/trips/london => /galleries/trips/london/index.html</p>
- </dd>
- <dt>gallery_global</dt>
- <dd><p>Link to the global gallery path, which contains all the images in galleries.</p>
- <p>There is only one copy of an image on multilingual blogs, in the site root.</p>
- <p>link://gallery_global/london => /galleries/trips/london/index.html</p>
- <p>link://gallery_global/trips/london => /galleries/trips/london/index.html</p>
- <p>(a <code class="docutils literal">gallery</code> link could lead to eg. /en/galleries/trips/london/index.html)</p>
- </dd>
- <dt>gallery_rss</dt>
- <dd><p>Link to an image gallery's RSS feed.</p>
- <p>It will try to find a gallery with that name if it's not ambiguous
- or with that path. For example:</p>
- <p>link://gallery_rss/london => /galleries/trips/london/rss.xml</p>
- <p>link://gallery_rss/trips/london => /galleries/trips/london/rss.xml</p>
- </dd>
- <dt>index</dt>
- <dd><p>Link to a numbered index.</p>
- <p>Example:</p>
- <p>link://index/3 => /index-3.html</p>
- </dd>
- <dt>index_atom</dt>
- <dd><p>Link to a numbered Atom index.</p>
- <p>Example:</p>
- <p>link://index_atom/3 => /index-3.atom</p>
- </dd>
- <dt>index_rss</dt>
- <dd><p>A link to the RSS feed path.</p>
- <p>Example:</p>
- <p>link://rss => /blog/rss.xml</p>
- </dd>
- <dt>listing</dt>
- <dd><p>Return a link to a listing.</p>
- <p>It will try to use the file name if it's not ambiguous, or the file path.</p>
- <p>Example:</p>
- <p>link://listing/hello.py => /listings/tutorial/hello.py.html</p>
- <p>link://listing/tutorial/hello.py => /listings/tutorial/hello.py.html</p>
- </dd>
- <dt>listing_source</dt>
- <dd><p>Return a link to the source code for a listing.</p>
- <p>It will try to use the file name if it's not ambiguous, or the file path.</p>
- <p>Example:</p>
- <p>link://listing_source/hello.py => /listings/tutorial/hello.py</p>
- <p>link://listing_source/tutorial/hello.py => /listings/tutorial/hello.py</p>
- </dd>
- <dt>post_path</dt>
- <dd><p>Link to the destination of an element in the POSTS/PAGES settings.</p>
- <p>Example:</p>
- <p>link://post_path/posts => /blog</p>
- </dd>
- <dt>root</dt>
- <dd><p>Link to the current language's root.</p>
- <p>Example:</p>
- <p>link://root_path => /</p>
- <p>link://root_path => /translations/spanish/</p>
- </dd>
- <dt>rss</dt>
- <dd><p>A link to the RSS feed path.</p>
- <p>Example:</p>
- <p>link://rss => /blog/rss.xml</p>
- </dd>
- <dt>slug</dt>
- <dd><p>Return a link to a post with given slug, if not ambiguous.</p>
- <p>Example:</p>
- <p>link://slug/yellow-camaro => /posts/cars/awful/yellow-camaro/index.html</p>
- </dd>
- <dt>tag</dt>
- <dd><p>A link to a tag's page. Takes page number as optional keyword argument.</p>
- <p>Example:</p>
- <p>link://tag/cats => /tags/cats.html</p>
- </dd>
- <dt>tag_atom</dt>
- <dd><p>A link to a tag's Atom feed.</p>
- <p>Example:</p>
- <p>link://tag_atom/cats => /tags/cats.atom</p>
- </dd>
- <dt>tag_index</dt>
- <dd><p>A link to the tag index.</p>
- <p>Example:</p>
- <p>link://tag_index => /tags/index.html</p>
- </dd>
- <dt>tag_rss</dt>
- <dd><p>A link to a tag's RSS feed.</p>
- <p>Example:</p>
- <p>link://tag_rss/cats => /tags/cats.xml</p>
- </dd>
- </dl>
|