Just set up a site using the static site generator pelican. So far so good. The simplicity of a static site makes quite a bit of sense to me. One major appeal is the fact that I can easily generate posts using the Jupyter notebook. Since the initial plan is to use the blog as a electronic notebook, I think this will work quite well. Obviously a static site has some disadvantages:

  • It is not clear how posting comments on articles will work: from the themes it appears that this feature is possible if I choose to enable it.
  • Currently, I plan to limit access between the static and public data by creating two independent sites. I'm not sure how this will work in the long run.
  • I imagine it won't be long before a more dynamic cms system integrates notebook tools into their workflow. I may be selling myself a bit short by committing to static system, I do think it is a good way to have a bit more control over the site.

Installation notes:

generally I followed this procedure :

First I created a git repository for the site and then created the requirements.txt file; however, I left out ghp-import and the matplotlib requirements.

Markdown==2.6.6
pelican==3.6.3
jupyter>=1.0
ipython>=4.0
nbconvert>=4.0
beautifulsoup4

Next from the repository directory I ran pip install -r requirements.txt and then pelican-quickstart

In the dialog I used the defaults except for the URL prefix and timezone which I replied n and America/Los_Angeles respectively.

I then created a new directory for the plugins mkdir plugins and cloned the ipynb repo as a submodule.

git submodule add git://github.com/danielfrg/pelican-ipynb.git plugins/ipynb

I activated the plugin by adding the following to pelicanconf.py

```MARKUP = ('md', 'ipynb')

PLUGIN_PATH = './plugins' PLUGINS = ['ipynb.markup']```

I cloned the pelican-themes as a submodule as well:

git submodule add https://github.com/getpelican/pelican-themes.git and activated the bootstrap3 theme by adding THEME = './pelican-themes/pelican-bootstrap3'

to 'pelicanconf.py'

Finally I added this flag at the end of the config file to enable a richer list of metadata on the post list page.

DISPLAY_ARTICLE_INFO_ON_INDEX = True

So here is a test of the notebook in action!

In [1]:
%pylab inline
plot([1,2,3,4])
Populating the interactive namespace from numpy and matplotlib
Out[1]:
[]
In [ ]:
 

Comments

comments powered by Disqus