A new Riff-radio.org site with a static approach.

path_handlers.html 5.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. <!-- DO NOT EDIT, this file is auto-generated by scripts/document_path_handlers.py -->
  2. <p>Nikola supports special links with the syntax <code class="docutils literal"><span class="pre">link://kind/name</span></code>. In
  3. templates you can also use <code class="docutils literal">_link(kind, name)</code>. You can add query strings
  4. (<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
  5. templates (support and behavior depends on path handlers themselves). Fragments
  6. (<code class="docutils literal">#anchor</code>) will be appended to the transformed link.</p>
  7. <p>Here are the descriptions for all the supported kinds.</p>
  8. <dl class="dl-horizontal">
  9. <dt>archive</dt>
  10. <dd><p>Link to archive path, name is the year.</p>
  11. <p>Example:</p>
  12. <p>link://archive/2013 =&gt; /archives/2013/index.html</p>
  13. </dd>
  14. <dt>author</dt>
  15. <dd><p>Link to an author's page.</p>
  16. <p>Example:</p>
  17. <p>link://author/joe =&gt; /authors/joe.html</p>
  18. </dd>
  19. <dt>author_atom</dt>
  20. <dd><p>Link to an author's Atom feed.</p>
  21. <p>Example:</p>
  22. <p>link://author_atom/joe =&gt; /authors/joe.atom</p>
  23. </dd>
  24. <dt>author_index</dt>
  25. <dd><p>Link to the authors index.</p>
  26. <p>Example:</p>
  27. <p>link://authors/ =&gt; /authors/index.html</p>
  28. </dd>
  29. <dt>author_rss</dt>
  30. <dd><p>Link to an author's RSS feed.</p>
  31. <p>Example:</p>
  32. <p>link://author_rss/joe =&gt; /authors/joe.xml</p>
  33. </dd>
  34. <dt>category</dt>
  35. <dd><p>A link to a category. Takes page number as optional keyword argument.</p>
  36. <p>Example:</p>
  37. <p>link://category/dogs =&gt; /categories/dogs.html</p>
  38. </dd>
  39. <dt>category_atom</dt>
  40. <dd><p>A link to a category's Atom feed.</p>
  41. <p>Example:</p>
  42. <p>link://category_atom/dogs =&gt; /categories/dogs.atom</p>
  43. </dd>
  44. <dt>category_index</dt>
  45. <dd><p>A link to the category index.</p>
  46. <p>Example:</p>
  47. <p>link://category_index =&gt; /categories/index.html</p>
  48. </dd>
  49. <dt>category_rss</dt>
  50. <dd><p>A link to a category's RSS feed.</p>
  51. <p>Example:</p>
  52. <p>link://category_rss/dogs =&gt; /categories/dogs.xml</p>
  53. </dd>
  54. <dt>filename</dt>
  55. <dd><p>Link to post or page by source filename.</p>
  56. <p>Example:</p>
  57. <p>link://filename/manual.txt =&gt; /docs/handbook.html</p>
  58. </dd>
  59. <dt>gallery</dt>
  60. <dd><p>Link to an image gallery's path.</p>
  61. <p>It will try to find a gallery with that name if it's not ambiguous
  62. or with that path. For example:</p>
  63. <p>link://gallery/london =&gt; /galleries/trips/london/index.html</p>
  64. <p>link://gallery/trips/london =&gt; /galleries/trips/london/index.html</p>
  65. </dd>
  66. <dt>gallery_global</dt>
  67. <dd><p>Link to the global gallery path, which contains all the images in galleries.</p>
  68. <p>There is only one copy of an image on multilingual blogs, in the site root.</p>
  69. <p>link://gallery_global/london =&gt; /galleries/trips/london/index.html</p>
  70. <p>link://gallery_global/trips/london =&gt; /galleries/trips/london/index.html</p>
  71. <p>(a <code class="docutils literal">gallery</code> link could lead to eg. /en/galleries/trips/london/index.html)</p>
  72. </dd>
  73. <dt>gallery_rss</dt>
  74. <dd><p>Link to an image gallery's RSS feed.</p>
  75. <p>It will try to find a gallery with that name if it's not ambiguous
  76. or with that path. For example:</p>
  77. <p>link://gallery_rss/london =&gt; /galleries/trips/london/rss.xml</p>
  78. <p>link://gallery_rss/trips/london =&gt; /galleries/trips/london/rss.xml</p>
  79. </dd>
  80. <dt>index</dt>
  81. <dd><p>Link to a numbered index.</p>
  82. <p>Example:</p>
  83. <p>link://index/3 =&gt; /index-3.html</p>
  84. </dd>
  85. <dt>index_atom</dt>
  86. <dd><p>Link to a numbered Atom index.</p>
  87. <p>Example:</p>
  88. <p>link://index_atom/3 =&gt; /index-3.atom</p>
  89. </dd>
  90. <dt>index_rss</dt>
  91. <dd><p>A link to the RSS feed path.</p>
  92. <p>Example:</p>
  93. <p>link://rss =&gt; /blog/rss.xml</p>
  94. </dd>
  95. <dt>listing</dt>
  96. <dd><p>Return a link to a listing.</p>
  97. <p>It will try to use the file name if it's not ambiguous, or the file path.</p>
  98. <p>Example:</p>
  99. <p>link://listing/hello.py =&gt; /listings/tutorial/hello.py.html</p>
  100. <p>link://listing/tutorial/hello.py =&gt; /listings/tutorial/hello.py.html</p>
  101. </dd>
  102. <dt>listing_source</dt>
  103. <dd><p>Return a link to the source code for a listing.</p>
  104. <p>It will try to use the file name if it's not ambiguous, or the file path.</p>
  105. <p>Example:</p>
  106. <p>link://listing_source/hello.py =&gt; /listings/tutorial/hello.py</p>
  107. <p>link://listing_source/tutorial/hello.py =&gt; /listings/tutorial/hello.py</p>
  108. </dd>
  109. <dt>post_path</dt>
  110. <dd><p>Link to the destination of an element in the POSTS/PAGES settings.</p>
  111. <p>Example:</p>
  112. <p>link://post_path/posts =&gt; /blog</p>
  113. </dd>
  114. <dt>root</dt>
  115. <dd><p>Link to the current language's root.</p>
  116. <p>Example:</p>
  117. <p>link://root_path =&gt; /</p>
  118. <p>link://root_path =&gt; /translations/spanish/</p>
  119. </dd>
  120. <dt>rss</dt>
  121. <dd><p>A link to the RSS feed path.</p>
  122. <p>Example:</p>
  123. <p>link://rss =&gt; /blog/rss.xml</p>
  124. </dd>
  125. <dt>slug</dt>
  126. <dd><p>Return a link to a post with given slug, if not ambiguous.</p>
  127. <p>Example:</p>
  128. <p>link://slug/yellow-camaro =&gt; /posts/cars/awful/yellow-camaro/index.html</p>
  129. </dd>
  130. <dt>tag</dt>
  131. <dd><p>A link to a tag's page. Takes page number as optional keyword argument.</p>
  132. <p>Example:</p>
  133. <p>link://tag/cats =&gt; /tags/cats.html</p>
  134. </dd>
  135. <dt>tag_atom</dt>
  136. <dd><p>A link to a tag's Atom feed.</p>
  137. <p>Example:</p>
  138. <p>link://tag_atom/cats =&gt; /tags/cats.atom</p>
  139. </dd>
  140. <dt>tag_index</dt>
  141. <dd><p>A link to the tag index.</p>
  142. <p>Example:</p>
  143. <p>link://tag_index =&gt; /tags/index.html</p>
  144. </dd>
  145. <dt>tag_rss</dt>
  146. <dd><p>A link to a tag's RSS feed.</p>
  147. <p>Example:</p>
  148. <p>link://tag_rss/cats =&gt; /tags/cats.xml</p>
  149. </dd>
  150. </dl>