I sometime forget how to manage this site.
This site is managed with hakyll, a package to manage static html contents written in haskell. The contents of html is in a git repository hosted in github, served as html with github pages.
The contents of hakyll codes, css, template used to generate the site resides in gh-pages-8c6794b6, and the git repository for generated contents is in 8c6794b6.github.com repository.
When writing a new post, I start writing a new file under posts/
directory in
gh-pages-8c6794b6
repository, and generate the html:
[~/repos/gh-pages-8c6794b6] $ emacs posts/new_post.mkd
... edit the post
[~/repos/gh-pages-8c6794b6] $ ./hakyll build
The generated output will be created under _site
directory. The _site
directory is a git submodule of
gh-pages-8c6794b6
repository. When finished generating the html files,
commit the contents of _site
:
[~/repos/gh-pages-8c6794b6] $ cd _site
[~/repos/gh-pages-8c6794b6/_site] $ git add -i
... add new post, new tags, update archives, rss, tags, etc ...
[~/repos/gh-pages-8c6794b6/_site] $ git commit -m "Add new post"
[~/repos/gh-pages-8c6794b6/_site] $ git push origin master
Now add the updated submodule to gh-pages-8c6794b6
repository:
[~/repos/gh-pages-8c6794b6/_site] $ cd ../
[~/repos/gh-pages-8c6794b6] $ git add -i
... add submodule, new post, etc ...
[~/repos/gh-pages-8c6794b6] $ git commit -m "Add new post"
[~/repos/gh-pages-8c6794b6] $ git push origin master
And the new post is published.