# How to Pelican ## Install on Ubuntu Installing Python tools ``` sudo easy_install pip sudo pip install virtualenv sudo pip install virtualenvwrapper vi ~/.bashrc # Virtualenvwrapper export WORKON_HOME=$HOME/.virtualenvs source /usr/local/bin/virtualenvwrapper.sh source ~/.bashrc mkvirtualenv blog workon blog # And to leave: deactivate ``` Installing Pelican ``` sudo pip install pelican sudo pip install markdown ``` ## Creating a blog on [GitHub Pages](https://help.github.com/categories/20/articles/) ### Steps to publish a post In parenthesis is the git branch we are working on: * (`master`) Create the post in rst or md (rst and md are abbreviations for resTructuredText and markdown) * (`master`) Generate the HTML * (`master`) Check the post in a local server * (`master`) We could delete the output but dones't matter if we don't because git will ignore with our gitignore file * (`gh-pages`) Merge master branch * (`gh-pages`) Generate the HTML * (`gh-pages`) push all the files (normally all the new HTML) * (`master`) push all the files (normally only one post) ``` ``` ## Resources * http://blog.xlarrakoetxea.org/posts/2012/10/creating-a-blog-with-pelican * http://docs.getpelican.com/en/3.2/tips.html#publishing-to-github