altercation / OLD-ethanschoonover.com-original

website source (hakyll, pandoc markdown)
http://ethanschoonover.com
735 stars 95 forks source link

ethanschoonover.com site source

I use Hakyll to maintain this site. See the bin directory for the site.hs which builds the site statically.

Source structure

├── bin         hakyll source code
├── etc         nginx local config files
├── files       downloads, global to site
├── pages       special pages (colophon, error pages)
│   └── errors
├── posts       one time posts, with possible updates
├── projects    ongoing, updated projects
├── resources   static resources
│   ├── css
│   ├── img
│   └── js
├── src         non hakyll source files
│   └── psd
└── templates   templates used by hakyll

Deployment process overview

Local site modifications are tested until correct and pushed to github for offsite storage. When site updates are ready for public deployment I push to my web server.

Some subdirectories, notably the project subdirectories, are managed using git-subtree. The web pages for those project are identical to the github repository for those projects. The Hakyll site.hs code processes them and converts the github specific absolute urls to be relative to my server's webroot.

Git subtree has the advantage of allowing me to work on the project from either the main project directory on my machine or from the website directory (for local site preview). Additionally, the project itself is maintained with several git-subtree subdirectories, allowing me to break out the vim subdirectory as it's own repository and work on it, for instance, from within my personal dotfiles.

See http://chrisdone.com/posts/2010-04-04-hakyll-and-git-for-you-blog.html for other details on a similar hakyll-github-server deployment process that I took inspiration from.

Key commands

Deployment Server

Notes

See my dotfile repository for my master gitignore file. I've added both _cache and _site there (along with the standard haskell ignores) and locally I've added bin/site (the compile hakyll binary).