Skip to content

Commit b309d72

Browse files
committedOct 8, 2016
Use nikola theme -c and -n in theming tutorial
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
1 parent c2a0aea commit b309d72

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed
 

‎docs/creating-a-theme.txt

+7-9
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ First, we create a site with some content in it. We’ll use the ``nikola init``
7474
Creating Nikola Site
7575
====================
7676

77-
This is Nikola v7.4.1. We will now ask you a few easy questions about your new site.
77+
This is Nikola v7.8.0. We will now ask you a few easy questions about your new site.
7878
If you do not want to answer and want to go with the defaults instead, simply restart with the `-q` parameter.
7979
--- Questions about the site ---
8080
Site title [My Nikola Site]:
@@ -107,12 +107,10 @@ First, we create a site with some content in it. We’ll use the ``nikola init``
107107

108108

109109
Then, we create an empty theme inheriting from base. This theme will use Mako templates. If you prefer Jinja2,
110-
then you should use ``base-jinja`` instead::
110+
then you should use ``base-jinja`` as a parent and ``jinja`` as engine instead::
111111

112112
$ cd lanyon-port/
113-
$ mkdir themes
114-
$ mkdir themes/lanyon
115-
$ echo base > themes/lanyon/parent
113+
$ nikola theme -n lanyon --parent base --engine mako
116114

117115
Edit ``conf.py`` and set ``THEME = 'lanyon'``. Also set ``USE_BUNDLES = False`` (just do it for now, we’ll get to bundles later).
118116

@@ -207,11 +205,11 @@ But how do I tell **our** lanyon theme to use those CSS files instead of whateve
207205
By giving our theme its own base_helper.tmpl.
208206

209207
That file is a **template** used to generate parts of the pages. It’s large and
210-
complicated but we don’t need to change a lot of it. First, get it from
211-
`Nikola’s source code <https://github.com/getnikola/nikola/blob/master/nikola/data/themes/base/templates/base_helper.tmpl>`__ and put a copy in ``themes/lanyon/templates/base_helper.tmpl``::
208+
complicated but we don’t need to change a lot of it. First, make a copy in your
209+
theme (note this command requires setting your ``THEME`` in ``conf.py`` to
210+
``lanyon``)::
212211

213-
$ mkdir themes/lanyon/templates
214-
$ curl https://raw.githubusercontent.com/getnikola/nikola/master/nikola/data/themes/base/templates/base_helper.tmpl > themes/lanyon/templates/base_helper.tmpl
212+
$ nikola theme -c base_helper.tmpl
215213

216214
The part we want to change is this:
217215

0 commit comments

Comments
 (0)
Please sign in to comment.