Skip to content

zpoley/beepb00p

 
 

Repository files navigation

Hakyll compiler for my blog.

Features:

  • formats:
  • tags
  • feeds (rss/atom)
  • comments support using Isso
  • math support via Mathjax
  • drafts
  • custom metadata attributes (e.g. tags, special uuid attribute for linking comments, pingback)
  • symlink support

There are some comments in site.hs, feel free to email me or open an issue if you want me to explain how something works! I’ll write down about it properly at some point later!

Post compilers

Org-mode

See my org-mode sandbox.

Org related stuff is in Org.hs and misc/compile-org. To compile Org into HTML, I’m invoking Emacs in batch mode in compile-org script. Your can try it with misc/compile-org --test misc/test.org.

Reason I’m not using Pandoc for rendering is that it only supports a subset of Org-mode. If you are a heavy user of Org-mode features, e.g. doesn’t support literate programming via org-babel.

Using custom script lets me configure (and hack a little) Emacs to bend it into doing what I want. I also process the resulting HTML with BeautifulSoup to add some things org-mode isn’t capable of like sidenotes.

Ipython

See my org-mode sandbox.

Ipython related things are in Ipynb.hs and misc/compile-ipynb.

I’m compiling with jupyter, that executes the code and does few extra tweaks in misc/ipynbconfig.py, in particular:

  • hidden cell support (e.g. when you have lots of boilerlate that don’t need to be in the post body)
  • details/summary support, so you can collapse boilerplate or long outputs in a collapsible section.

Misc things

css/generate-links.py for generating CSS for certain links (e.g. wikipedia/reddit/github)

symlink support: see misc/poke-symlinks.py and preview.

Very useful when the target post (e.g. ipython notebook is in a different repository). Without this, detecting changes wouldn’t work (see issue).

screenshot comparisons via git-diff-image

Helpful for testing css changes.

In addition I’m using blink-diff since compare can’t handle pages that are too long :(

Running & building

I guess best place to start would be hakyll tutorial.

Compiling the site

When I want to release new version of site, I’m basically doing a clean rebuild and copying the resulting _site directory.

In reality it’s a little more elaborate, I’m keeping the whole website (HTMLs) under git, so I can easily track changes and rollback in case of issues. I’ll explain it and share some workflows later.

TODOs

[2019-11-09 Sat 16:52] explain about using .metadata files

Releases

No releases published

Packages

No packages published

Languages

  • Python 32.4%
  • Haskell 26.0%
  • CSS 21.1%
  • Emacs Lisp 9.7%
  • HTML 8.6%
  • Shell 1.7%
  • Smarty 0.5%