From 8bdf95f6a1c384d7a4e9f9a44647135515f0ce3d Mon Sep 17 00:00:00 2001 From: Donne Martin Date: Sun, 31 Jan 2016 07:30:51 -0500 Subject: [PATCH] Add Pelican commands. --- README.md | 3 ++- commands/misc.ipynb | 61 +++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 58 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 1e0b92f..7009bb1 100644 --- a/README.md +++ b/README.md @@ -272,7 +272,8 @@ IPython Notebook(s) demonstrating various command lines for Linux, Git, etc. | [ipython notebook](http://nbviewer.ipython.org/github/donnemartin/data-science-ipython-notebooks/blob/master/commands/misc.ipynb#ipython-notebook) | Web-based interactive computational environment where you can combine code execution, text, mathematics, plots and rich media into a single document. | | [git](http://nbviewer.ipython.org/github/donnemartin/data-science-ipython-notebooks/blob/master/commands/misc.ipynb#git) | Distributed revision control system with an emphasis on speed, data integrity, and support for distributed, non-linear workflows. | | [ruby](http://nbviewer.ipython.org/github/donnemartin/data-science-ipython-notebooks/blob/master/commands/misc.ipynb#ruby) | Used to interact with the AWS command line and for Jekyll, a blog framework that can be hosted on GitHub Pages. | -| [jekyll](http://nbviewer.ipython.org/github/donnemartin/data-science-ipython-notebooks/blob/master/commands/misc.ipynb#jekyll) | Simple, blog-aware, static site generator for personal, project, or organization sites. Renders Markdown or Textile and Liquid templates, and produces a complete, static website ready to be served by Apache HTTP Server, Nginx or another web server. [Pelican](https://github.com/getpelican/pelican) is a python-based alternative. | +| [jekyll](http://nbviewer.ipython.org/github/donnemartin/data-science-ipython-notebooks/blob/master/commands/misc.ipynb#jekyll) | Simple, blog-aware, static site generator for personal, project, or organization sites. Renders Markdown or Textile and Liquid templates, and produces a complete, static website ready to be served by Apache HTTP Server, Nginx or another web server. | +| [pelican](http://nbviewer.ipython.org/github/donnemartin/data-science-ipython-notebooks/blob/master/commands/misc.ipynb#pelican) | Python-based alternative to Jekyll. | | [django](http://nbviewer.ipython.org/github/donnemartin/data-science-ipython-notebooks/blob/master/commands/misc.ipynb#django) | High-level Python Web framework that encourages rapid development and clean, pragmatic design. It can be useful to share reports/analyses and for blogging. Lighter-weight alternatives include [Pyramid](https://github.com/Pylons/pyramid), [Flask](https://github.com/mitsuhiko/flask), [Tornado](https://github.com/tornadoweb/tornado), and [Bottle](https://github.com/bottlepy/bottle). ## misc diff --git a/commands/misc.ipynb b/commands/misc.ipynb index 009c9b4..0a4fc4b 100644 --- a/commands/misc.ipynb +++ b/commands/misc.ipynb @@ -18,6 +18,7 @@ "* Git\n", "* Ruby\n", "* Jekyll\n", + "* Pelican\n", "* Django" ] }, @@ -442,6 +443,56 @@ "!bundle exec jekyll serve" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "

Pelican

" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "I've switched my personal website [donnemartin.com](http://donnemartin.com/) to run off Pelican, a python-based alternative to Jekyll. Previous iterations ran off Wordpress and Jekyll.\n", + "\n", + "Setup [reference](http://nafiulis.me/making-a-static-blog-with-pelican.html)." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "# Install\n", + "!pip install pelican\n", + "!pip install markdown\n", + "!pip install ghp-import\n", + "\n", + "# Quick retup\n", + "!pelican-quickstart\n", + "\n", + "# Run server\n", + "!make devserver\n", + "\n", + "# Stop server\n", + "!make stopserver\n", + "\n", + "# Run ghp-import on output folder\n", + "# Review https://pypi.python.org/pypi/ghp-import\n", + "# There's a \"Big Fat Warning\" section\n", + "!ghp-import output\n", + "\n", + "# Update gh-pages (if using a project page)\n", + "!git push origin gh-pages\n", + "\n", + "# Update gh-pages (if using a user or org page)\n", + "!git merge gh-pages master" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -515,21 +566,21 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 2", + "display_name": "Python 3", "language": "python", - "name": "python2" + "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", - "version": 2 + "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython2", - "version": "2.7.10" + "pygments_lexer": "ipython3", + "version": "3.4.3" } }, "nbformat": 4,