I spent an hour or so configuring my blog to use reCAPTCHA instead of forcing people to signup for silly accounts. The bad thing about this is that sometimes the CAPTCHA’s are really hard. Currently, it’s a bit annoying because if you mess up, it takes you to this confirmation page. If your browser is weird, it may lose your comment in the process. Maybe this can be done with an AJAX call before the submit goes through.
I spent another hour replacing my old syntax highlighting code (using some javascript from pygments.com). I think how this old one worked was that it would send the text over to a server which was running pygments and return the highlighted code. Instead, I’m using a fully client-side highlighter from google, code-prettify. It is actually quite good. Specifying the language is optional and it can still try to infer the correct highlighting. I mucked around in Markdown to make it so I could specify the language. Here’s the syntax I adopted (I’d seen similar syntax with other syntax highlighters for Markdown):
This is how I do $\LaTeX$.
::: python
var foo = bar;
This `code here` is unspecified and code-prettify will still
give it a go.
I’ve been toying with the idea of making a completely client-side blog. That is, my webpage would be strictly the model and the browsers would be the viewers. The browser would run a javascript implement of Markdown. I think it’d be a fun thing to do and is a bit orthogonal from most blogging platforms.
Leave a comment