This repository contains the code I wrote to complete the 52 exercises of Learn Python the Hard Way by Zed Shaw.
I attempt to write about this probably horrific experience with GitHub Pages and Pelican at richlearnspythonthehardway.org.
You can create a similar diary of trauma by forking this repository. Replace Rich-specific bits as necessary. I typically install projects to ~/Sites
, but is by no means required.
$ mkvirtualenv myenv
(myenv)$ git clone git@github.com:richardcornish/richlearnspythonthehardway.git
(myenv)$ cd richlearnspythonthehardway/
(myenv)$ pip install -r requirements.txt
You should use Python 2 because Zed Shaw is vehemently against Python 3.
Add and edit Markdown files in pelican/content/
. Then generate them:
(myenv)$ pelican pelican/content -o pelican/output -s pelican/pelicanconf.py -t pelican/themes/rich
(myenv)$ (cd pelican/output/ && python -m SimpleHTTPServer)
Add -t
to pelican
for plain text. :)
Visit http://0.0.0.0:8000/.
Now publish to the live Interwebs.
(myenv)$ git push origin master
(myenv)$ ghp-import -p pelican/output
Visit richardcornish.github.io/richlearnspythonthehardway (or richlearnspythonthehardway.org).
- Replace the text in
pelican/content/extra/CNAME
with your own domain (and follow publish steps). - Copy the IP addresses for A records from GitHub
- Enter the IP addresses for the A record of your domain into your domain registrar's control panel, e.g. in Google Domains.