Skip to content
Permalink
Browse files

document ipynb support

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information...
Kwpolska committed Jun 4, 2015
1 parent 782ab40 commit 82c53399ea69f2ae763d729d5e7627edf6ed0b49
Showing with 14 additions and 1 deletion.
  1. +14 −1 docs/creating-a-theme.txt
@@ -194,7 +194,12 @@ Nikola, adapting the paths a little so that they follow our conventions::
Notice I am *not* copying ``syntax.css``? That’s because Nikola handles that styles for syntax highlighting
in a particular way, using a setting called ``CODE_COLOR_SCHEME`` where you can configure
what color scheme the syntax highlighter uses. You can use your own ``assets/css/code.css`` if you
don’t like the provided ones. Nikola **requires** ``assets/css/rst.css`` and ``assets/css/code.css`` to function properly.
don’t like the provided ones.

Nikola **requires** ``assets/css/rst.css`` and ``assets/css/code.css`` to function properly.
We will also add themes for IPython Notebook (``assets/css/ipython.min.css``
and ``assets/css/nikola_ipython.css``) into the template; note that they are
activated only if you configured your ``POSTS``/``PAGES`` with ipynb support.

But how do I tell **our** lanyon theme to use those CSS files instead of whatever it’s using now?
By giving our theme its own base_helper.tmpl.
@@ -225,6 +230,10 @@ The part we want to change is this:
<link href="/assets/css/custom.css" rel="stylesheet" type="text/css">
%endif
%endif
% if needs_ipython_css:
<link href="/assets/css/ipython.min.css" rel="stylesheet" type="text/css">
<link href="/assets/css/nikola_ipython.css" rel="stylesheet" type="text/css">
% endif
</%def>

And we will change it so it uses the lanyon styles instead of theme.css (again, ignore the bundles for now!):
@@ -243,6 +252,10 @@ And we will change it so it uses the lanyon styles instead of theme.css (again,
<link href="/assets/css/custom.css" rel="stylesheet" type="text/css">
%endif
%endif
% if needs_ipython_css:
<link href="/assets/css/ipython.min.css" rel="stylesheet" type="text/css">
<link href="/assets/css/nikola_ipython.css" rel="stylesheet" type="text/css">
% endif
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=PT+Serif:400,400italic,700|PT+Sans:400">
</%def>

0 comments on commit 82c5339

Please sign in to comment.
You can’t perform that action at this time.