I’ve written a new plugin for Pelican, the Python-based program that runs this website. It can be found on GitHub, where there is a pull request pending to incorporate it into Pelican’s central plugins repository.
The plugin is called Better Codeblock Line Numbering, and it creates line numbers at the left side of codeblocks, like this:
# This is line 1. # This is line 2. It's very long, which means that it might wrap over onto another line. When it does, though, we don't want that wrapped part to be labeled as a new line of text, because it isn't. Rather, it's just a wrapped version of one long single line. # This is line 3.
solves a problem that I was having with embedding code here.
This plugin, the “YouTube Privacy Enhancer,” is a conceptual replication of the Electronic Frontier Foundation’s MyTube plugin, which pre-caches thumbnails of embedded YouTube videos so that users are not tracked by Google until they explicitly “opt-in” by clicking on the thumbnail (at which point the thumbnail is replaced by the video embed iframe). I do this to keep external tracking cookies from your computer as much as possible; I think that this is an ethical practice. A full explanation of the plugin’s rationale and inspiration (the EFF’s MyTube plugin for Drupal) can be found here.
Here’s an example: by writing
the video from http://youtu.be/QHmML7bu-iM is embedded like this (click to view):