Add support for pictures with light/dark variants
We can easily embed an image with the Markdown ![]()
notation, but since gi-docgen has its own theme that responds to media queries like dark preference, we need something more complex in order to embed an image for the light style and for the dark one, and select the appropriate one at run time. In HTML:
<picture>
<source srcset="foo-dark.png" media="(prefers-color-scheme: dark)">
<img alt="1000 words of description" src="foo-light.png">
</picture>
A common way to solve this for any static website generator is to use the equivalent of Octopress's "liquid tags", e.g.
{% picture "foo-light.png" "foo-dark.png" "1000 words of description" %}
This is doable with a simple Markdown extension, in the same way we parse gi-docgen documentation links from the docblocks and substitute them with HTML.