Harry R. Schwartz
Code writer, sometime Internet enthusiast, attractive nuisance.
Colophon
This is a static site built on top of Jekyll (with a fair amount of custom code, too). Pages and articles are written in Markdown and compiled to HTML.
Fonts & Layout
Since I’m not worried about my site looking identical on every device, but do want load times to be as short as possible, I just use a boring font stack instead of a Web font. Text is slightly lighter than pure black, as that’s said to be easier on the eyes. I also enable a few ligatures and old-style numbers, just because I like ‘em:
body {
color: #333;
font: 16px/1.6 "Libre Baskerville", "Book Antiqua", Palatino, serif;
font-variant-numeric: oldstyle-nums;
text-rendering: optimizeLegibility;
}
Layout’s similarly simple. I use a couple @media
rules to resize the main
content wrapper on mobile devices and increase contrast for print, but that’s
about it!
The site’s background color is cosmic latte, the average color of the universe (a design choice shamelessly stolen from Robin Sloan).
JavaScript
I’m not a big fan of surveillance capitalism, and I don’t especially need to know how many visitors I get, so there’s no client-side tracking on this site.
In fact, with the exception of MathJax for rendering a few math-heavy articles, and one or two articles that feature a JS widget, there’s no JavaScript running at all. That helps keep things snappy, even on a mobile device. I’d love to switch over to MathML to remove that last dependency, but the Chromium engine still doesn’t support it.
Hosting
I’m currently hosted on GitHub Pages. Because this site renders with a
nontrivial amount of custom code, which GitHub doesn’t natively support, I
maintain two repositories: one contains the source of the site, and the other
(which is what’s actually hosted by Pages) contains the compiled HTML and
assets. I run a make deploy
task that compiles the site to the second repo,
makes a commit, and pushes it up.
A nice side effect of compiling the site locally and just pushing up some HTML is that it’ll be easier to move to a new host once GitHub someday screws the pooch.
CDN
I use Cloudflare as my CDN. I don’t especially love them, but using a CDN makes downloads (especially of big images) a bit faster for folks who aren’t near GitHub’s servers. That’s especially important in areas without a good connection; I can personally assert that my site’s still pretty snappy in rural Kenya.
Subscriptions
Syndication is great! As such, this site provides both an Atom feed and a JSON feed. Furthermore, since articles are formatted with h-entry markup, the blog should be a valid h-feed stream.
The index page is also formatted with h-card markup.
I’ve also got a mailing list through Mailchimp for folks who prefer that. Honestly, I’m not even subscribed to the darn thing myself, so I’m not sure what’s going on in there. It should be automatically reading articles from my Atom feed and transforming them into emails.
Open Graph
Articles are automatically annotated with some Open Graph metadata. If you paste a link to one of my articles on a social networking site or in some chat applications, a card will appear with the title of the post, the name of the site, and a little cartoon image of my smilin’ face.
PDFs
Some articles include a link to a PDF version of the same content. Every now and then I like to print off articles I find, or save them locally for later; maybe other folks do, too?
Those PDFs are generated at build time by shelling out to pandoc and
LaTeX from a custom Rake task. Each article can have a pdf
tag in its
YAML metadata; if that’s set, a PDF will be generated and linked in the rendered
page.
Similar articles
Each article’s footer suggests a short list of (hypothetically) similar articles for further reading. Those lists are generated programmatically. Article similarity is scored using the Okapi BM25 ranking function and implemented in the tf-idf-similarity gem. Rebuilding the similar-articles database is wired up to Jekyll with a custom Rake task, which stores the database as a YAML file that’s referenced by Jekyll at build time.
History
I first started this site in my senior year of undergrad in 2007. It lived on Blogger for a year or two before migrating to a self-hosted WordPress instance. I was simultaneously running a separate personal site (built with the charming and tiny but functionally deceased toto framework), and finally merged the two into a single Jekyll site in 2013.