Skip to content

Commit ab1006e

Browse files
committedApr 14, 2017
Add template variables documentation
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
1 parent ee60fd0 commit ab1006e

6 files changed

+451
-4
lines changed
 

‎.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ output
55
.doit.db
66
.doit.db.db
77
.venv
8+
nikolaserve.pid

‎state_data.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"last_deploy": "2017-03-26T18:37:54.404225"
2+
"last_deploy": "2017-04-14T10:50:30.048429"
33
}

‎stories/creating-a-theme.txt

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ create themes. Since I **suck** at designing websites, I asked for opinions on t
1717
and got some feedback. Since this is **Not So Hard™**, I will try to make time to port a few
1818
and see what happens.
1919

20+
If you are looking for a reference, check out `Theming reference <theming.html>`_ and `Template variables <https://getnikola.com/template-variables.html>`_.
21+
2022
Today’s theme is `Lanyon <https://github.com/poole/lanyon>`__ which is written by `@mdo <https://twitter.com/mdo>`__
2123
and released under a MIT license, which is liberal enough.
2224

‎stories/documentation.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ the current GitHub master, check out `Nikola on ReadTheDocs
2424
`Creating Custom Pages <creating-a-custom-page.html>`__
2525
How to do custom pages for special purposes, with special templates and styling.
2626

27-
`Theming Tutorial <creating-a-theme.html>`_ and `Theming reference <theming.html>`_
27+
`Theming Tutorial <creating-a-theme.html>`_, `Theming reference <theming.html>`_, `Template variables <template-variables.html>`_
2828
Useful if you want to create or customize a theme.
2929

3030
`Extending Nikola <extending.html>`_ and `Nikola Internals <internals.html>`_

‎stories/template-variables.rst

+438
Large diffs are not rendered by default.

‎stories/theming.txt

+8-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Theming Nikola
1919
.. class:: lead
2020

2121
This document is a reference about themes. If you want a tutorial, please read
22-
`Creating a Theme <creating-a-theme.html>`_
22+
`Creating a Theme <creating-a-theme.html>`_.
2323

2424
The Structure
2525
-------------
@@ -158,7 +158,7 @@ These are the templates that come with the included themes:
158158
+ ``title``: The title of the image.
159159
+ ``size``: A dict containing ``w`` and ``h``, the real size of the thumbnail.
160160

161-
* ``photo_array_json``: a JSON dump of photo_array, used in the bootstrap theme by flowr.js
161+
* ``photo_array_json``: a JSON dump of photo_array, used in the bootstrap theme by flowr.js
162162

163163
``list.tmpl``
164164
Template used to display generic lists of links, which it gets in ``items``,
@@ -200,6 +200,12 @@ require whatever data you want.
200200
Also, you can specify a custom template to be used by a post or page via the ``template`` metadata,
201201
and custom templates can be added in the ``templates/`` folder of your site.
202202

203+
Variables available in templates
204+
--------------------------------
205+
206+
The list of variables available in templates is maintained in a separate
207+
document: `Template variables <https://getnikola.com/template-variables.html>`_
208+
203209
Customizing themes to user color preference and section colors
204210
--------------------------------------------------------------
205211

0 commit comments

Comments
 (0)
Please sign in to comment.