Second Pelican attempt: creating a blog on GitHub with Pelican

Suppose that you are curios about GitHub pages… but I don’t understand their guide.

And suppose that you don’t like Ruby but prefer Python…

First of all create a repo named youname.github.com on your GitHub account (ok, maybe, before this, you have to create a GitHub account!).
Then set the remote origin locally with

    # I use ssh because I can log in without a password saving my key at https://github.com/settings/ssh    
    git remote add origin ssh://git@github.com/yourname/yourname.github.com.git    

Now you can follow the excellent guide by Martin.

Maybe you need to change

    mkvirtualenv -p python2.7 blog    

with something like

    mkvirtualenv -p /usr/bin/python blog    

If you need to write equation, use MathJax is straightforward. Following this post you only need to add few lines to the base.html of your theme and write latex-style equation like $$\frac{x_n}{x_{n+1}}$$ to obtain

$$\frac{xn}{x{n+1}}$$

If you want to show code you only need to indent it with four spaces and put the languade identifier (:::python) on the top, indented in the same way (.=space):

....:::python    
....def print_python():    
........print "Python:)"    

produces

def print_python():
    print "Python:)"

Now, if can also blog from the IPython Notebook following the guide by Daniel.

And That’s all Folks!:P

PS: see also this great guide

Tags// , , ,
comments powered by Disqus