/schryer_pelican_blog

Build system for schryer.github.io

Primary LanguagePythonCreative Commons Zero v1.0 UniversalCC0-1.0

Pelican setup to deploy the gh-pages branch of schryer_pelican_blog

The webpage is deployed at:

http://schryer.github.io/schryer_pelican_blog

Building the blog pages

The build process consists of two commands, both of which are executed in the root directory of this repository. The first is a Python script that reads all Markdown files in stubs/ and stubs/pages/ and creates analogous files within content/ and content/pages/ with the contents of external_links.md appended to each:

python add_links.py

To avoid confusing these generated files with user generated files, the extensions in the group EXT (.md or .ipynb or .ipynb-meta) have been replaced with _GENERATED_by_add_links.EXT.

The second command is the Pelican build itself which places its output in output/:

pelican content

Because GitHub pages requires a repository with the same name as the above address (schryer.github.io) and updates the content after every push, I added schryer.github.io as a subrepository within output/. Thus, the final step in building schryer.github.io is to commit and push the changes within output/ to GitHub. In most cases this involves issuing one command, although other commands may be required depending on the state of the repository:

git commit -a -m "Appropriate message here."

Cleaning temporary files.

The entire contents of output/ can be wiped out by accident because the contents of output/ are generated, however, I still changed the default behavior of the clean function within the Makefile to clean out the files generated by add_links.py. This is also accomplished using the add_links.py script.

python add_links.py --clean

For further questions: Use the source...