JohnPaton / johnpaton.github.io

✏️ John's Blog

Home Page:http://johnpaton.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status

johnpaton.net

This is the source repository for johnpaton.net, which is built with Pelican, deployed with TravisCI, and served by GitHub Pages.

Development

The source for building the website is located in the dev branch. To get started, clone the repository and also its submodules, and install the requirements:

$ git clone -b dev git@github.com:JohnPaton/johnpaton.github.io.git
$ cd johnpaton.github.io
$ git submodule update --init --recursive
$ pip3 install -r requirements.txt

The settings for the Pelican build are in pelicanconf.py. All the website content is stored in the content directory. To make changes, edit the markdown files there or make a new one. To preview your changes, from the repository root run:

$ pelican -ds pelicanconf.py

The generated site will be written to the output directory. As an alternative to rebuilding every time, you can also run make devserver to start a development server at http://localhost:8000. Every time a change is detected in one of the source files, the output will be regenerated, so you just have to refresh the page you're working on to see the changes to the source reflected.

Deployment

To deploy changes to the site, the generated contents of output need to be committed to the master branch, which is where GitHub Pages serves the site from. This is currently handled by TravisCI and their super handy GitHub Pages Deployment, with a new deployment being triggered by any new commits being pushed to the dev branch. Don't forget to save a Personal Access Token to the GITHUB_TOKEN environment variable in Travis!

Pelican setting overrides for deployment (e.g. changing the host for generated links from localhost:8000 to johnpaton.net) are stored in publishconf.py.

About

✏️ John's Blog

http://johnpaton.net


Languages

Language:Jupyter Notebook 90.3%Language:CSS 3.2%Language:HTML 1.8%Language:Makefile 1.6%Language:Python 1.5%Language:Shell 0.8%Language:JavaScript 0.7%