fix metadata

fix metadata is used to switch provisional fixes for browser limitations on or off. Its metadata value is expected to be a recognized fix. A particular fix is switched on by appearing in the metadata value and switched off by not appearing in the metadata value.

Recognized fixes

inherit

The value assigned in a fix metadata declaration overwrites fixes inherited from elsewhere by default. Not so with this fix: it preserves inherited settings. So the declaration

@ fix: list-numbers, inherit

in an Aneamal file activates the list-numbers fix, but also keeps other fixes active that may have been assigned in a metadata declaration inside the Aneamal root directory’s @meta.nml file for example.

list-numbers

Browsers are typically limited to handle numbers for HTML list items whose absolute value does not exceed 2147483647, no matter whether that value is explicitly given in an HTML value attribute or implicitly calculated by the browser. This limit does not only affect lists whose number is displayed as a decimal digit, but also those whose number is represented by letters in the webpage.

The fix adds CSS via an HTML style attribute on list items to display bigger numbers, e.g.

<li style='list-style-type:"9999999999. "'>

Supporting browsers display the number correctly then, because the browser treats it as arbitrary text where the limit for handling a numeric value does not apply.

previews

Not all browsers display efficient JPEG XL (JXL) images yet, which is why the Aneamal Translator still generates classic JPEG previews of images linked with a [j] file token.

But this fix makes the Aneamal Translator generate a JXL preview additionally, if your server supports it. This requires Imagick/ImageMagick 7.0.10-54 or newer. Mind that JXLs can not be encoded progressively with it yet. The additional JXL preview is linked in a HTML source element and loaded by supporting browsers. source and img are wrapped in a HTML picture element. This is how the HTML could look:

<figure>
<a href='/path/to/example.png'><picture><source srcset='/aneamal/public/jpeg/12/34567.jxl' type='image/jxl'><img src='/aneamal/public/jpeg/12/34567.jpg' alt='a bee' width='640' height='480'></picture></a>
</figure>

This fix will still offer a classic JPEG as a fallback when Aneamal switches to generating JXL previews by default in the future.

Example

@ fix: list-numbers