Followed from https://www.dataquest.io/blog/how-to-setup-a-data-science-blog/
Set things up
cd ~/Desktop
mkdir jupyter-blog
cd jupyter-blog
nano .gitignore
# add contents from this file https://github.com/github/gitignore/blob/master/Python.gitignore
Create virtual environment
virtualenv -p /usr/bin/python3.6 blogEnv
source blogEnv/bin/activate
Make a txt file with requirements. Include the following requirements
Markdown==2.6.6
pelican==3.6.3
jupyter>=1.0
ipython>=4.0
nbconvert>=4.0
beautifulsoup4
ghp-import==0.4.1
matplotlib==1.5.1
Then run the following command to install requirements
pip install -r requirements.txt
Some things failed
pip install -U wheel
and:
pip install markdown
Start interactive setup
pelican-quickstart
Then, git things
git init
mkdir plugins
git submodule add git://github.com/danielfrg/pelican-ipynb.git plugins/ipynb
Modify pelicanconf.py
with the following:
(specified from the above link, and the README file in the ipynb plugin directory.)
MARKUP = ('md', 'ipynb')
PLUGIN_PATHS = ['./plugins']
PLUGINS = ['ipynb.markup']
IPYNB_USE_META_SUMMARY = True
IGNORE_FILES = ['.ipynb_checkpoints']
Then ran
pelican content
And cd'd in to output and ran
python -m pelican.server
And previewed the post at localhost:8000
Next, ran
git remote add origin git@github.com:taylorreiter/taylorreiter.github.io.git
Modify config file again with
SITEURL = 'http://taylorreiter.github.io'
Use correct settings for deployment?
pelican content -s publishconf.py
Make a branch to store notebooks on? Call it dev
git checkout -b dev
Install ghp-import
pip install ghp-import
Push to github
ghp-import output -b master
Needed to do things that I don't understand yet
git pull origin master --allow-unrelated-histories
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
And
git push origin master