These are my notes for setting up a virtual environment for Nikola, the static site generator that I use to build my blog.
This document guides you through the processes of setting up a virtual environment, this way you can use the lastest version of Nikola, pulling it fron pypi without worrying about breaking or poluting your system.
- This ensure true portability and reproducible environments.
Fedora
su -c 'dnf install python2-virtualenv.noarch python3-virtualenv.noarch'
su -c 'dnf install python2-pip.noarch python3-pip.noarch'
cd ~/Documents
mkdir virtualenvs
cd virtualenvs
Use the virtualenv-3
or the virtualenv-3.6
command.
virtualenv-3 --no-site-packages nikola
cd nikola
source bin/activate
pip install --upgrade setuptools pip
pip install --upgrade "Nikola[extras]"
git clone git@github.com:porfiriopaiz/blog.git
nikola build
nikola new_post -e
nikola serve --browser
git checkout master
git subtree split --prefix output -b gh-pages
git push -f origin gh-pages:gh-pages
git branch -D gh-pages