IPython plugin for Nikola updated
I am pleased to announce the new version of the IPython plugin for Nikola.
This new version has been incorporated into Nikola master a few weeks ago, so it is now available in the last release of Nikola, 5.5.1.
Now that IPython has achieved the 1.0 release, and with the incorporation of nbconvert as a part of the IPython machinery, the IPython plugin no longer needs to use a customized version of the old nbconvert, instead it is now using the the power of the new IPython.nbconvert infrastructure to export the ipynb files to HTML pieces to be rendered by Nikola.
With the simplification of the infrastructure, it is now easier to setup your blog to use the plugin following this five steps:
Note: I will explain from the ground, you probably can skip some steps if you are an IPython and Nikola user...
-
Install (you can do it using
pip install
inside a virtualenv):- IPython 1.0 (also pyzmq, tornado and jinja2, as notebook dependencies)
- Nikola 5.5.1
- Requests
- Sphinx
-
Init your site:
nikola init your_blog
- cd in your_blog
-
Download the IPython theme:
-
nikola install_theme -l
to list all the available themes in Nikola -
nikola install_theme jinja-site-ipython
or any theme with theipython
word in their names ie, you have axkcd-site-ipython
theme if you want a xkcd sytling for your blog ;-).
-
Note: Beware of the available sub_themes because probably you will need some css adjustments to use it. You can also write your custom theme if you want ;-).
-
Modify your
conf.py
file:-
add the following lines to your post_pages:
("posts/*.ipynb", "posts", "post.tmpl", True),
("stories/*.ipynb", "stories", "story.tmpl", False),
-
and make explicit to use the IPython theme:
THEME = 'jinja-site-ipython'
-
Note: You have to do all this four steps just once, then you will only do step 5 for writing your post.
-
Finally:
- To write a new post, just:
nikola new_post -f ipynb
(you can avoid-f ipynb
if you have only ipynb references in your post_pages). - Then,
nikola build
to build the site andnikola serve
to see it.
- To write a new post, just:
Easier, don't you think?
Ok, if you need any help or find any bug, just let us known open an issue on github or blame on me here ;-)
Cheers.
Damián
Did you like the content? Great!
Or visit my support page for more information.
Btw, don't forget this blog post is an ipynb file itself! So, you can download it from the "Source" link at the top of the post if you want to play with it ;-)
Comments powered by Disqus