Skip to content

Instantly share code, notes, and snippets.

@underchemist
Created December 5, 2017 22:46
Show Gist options
  • Save underchemist/3a6f9e8f6fadcba2fffc81d58fa0f89b to your computer and use it in GitHub Desktop.
Save underchemist/3a6f9e8f6fadcba2fffc81d58fa0f89b to your computer and use it in GitHub Desktop.
My workflow for writing, building locally, publishing, and deploying builds of my pelican blog to ysebastien.me
# Overview
You have two github repositories linked to your blog.
- blog-source > root dir of blog, contains all pelican conf and output
- underchemist.github.io > only the contents of output/
# Writing and building locally
## fabric
The fabfile.py in the root of blog-source has a bunch of helper functions to aid with development.
- fab build > uses pelicanconf.py for config
- fab regenerate > continually build on detected change (also uses pelicanconf.py)
- fab preview > uses publishconf.py which just overwrites pelicanconf.py
- fab serve > serves site and is accessable on localhost:8000
# Deploying to github pages
- commit and push all changes of blog-source from root dir
- ghp-import output > commits and pushes the content of ouput to blog-source:gh-pages
- git push git@github.com:underchemist/underchemist.github.io gh-pages:master > pushes blog-source:gh-pages to underchemist.github.io:master
- ysebastien.me should be serving from underchemist.github.io:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment