User Tools

Site Tools


simple_blog_with_pelican

This is an old revision of the document!


So you've got your new Tardis shell account, and you want to write a simple blog! What good fortune! Pelican is (like Jekyll) a simple way to generate static web pages, and it is written in Python. Some examples are found here: http://www.pelicanthemes.com/. OK! Let's start.

Install using Pip: <code>cd ~/. && pip install –user markdown pelican</code> Now clone the Pelican Themes repository: <code>git clone https://github.com/getpelican/pelican-themes</code>

Add the following to your bashrc (or shell configuration file) if necessary: <code>for p in ~/.local/bin; do -d $p/. || continue * || PATH=$p:$PATH done</code>

(This is actually for mksh, but it should work for other shells.)

Make a folder for Pelican: <code>mkdir ~/blog/ && cd ~/blog/</code>

Run the helper script: <code>cd ~/blog/ && pelican-quickstart</code> The options are largely self-explanatory. For “Do you want to specify a URL prefix?”, write: /~<tardis username>. Upon success, we see several folders, including 'content' and 'output'.

Now, enter the 'blog' directory and write something using your favorite text editor - here is our example: <code>cd ~/blog/content/</code>

**

Title: A dire warning
Date: 2050-05-19
Category: Urgent

Tardis is run by evil nefarious people who sacrifice a black cat at the pub every Monday.

**

Now we generate pages: <code>cd ~/blog/ && pelican</code>

Now copy / simlink the contents of the output folder to public_html.

Now look on https://tardis.ed.ac.uk/~<tardis username>/ for the blog homepage.

For custom themes, use the -t option to specify the directory, in this case, at ~/pelican-themes.

simple_blog_with_pelican.1498641288.txt.gz · Last modified: (external edit)