Conversation
|
Dunno what's going on with demo_eager --- I will check on it tomorrow. |
Option accepts URI/path and auto-determines image-type for common formats from filename suffix.
Added demonstration of override of favicon to custom-template example. Made one of the snapshots (demo_long) use the favicon option. Updated outputs for all snapshots
|
Thanks for the PR! This was really useful, I would have missed a few things otherwise. 😃 |
|
Ah, also |
|
Looks good to me --- ship it! :-) |
Added the favicon option as discussed.
The most interesting part was realizing that we need a media type to go with it. What I currently have implemented is a fairly fast and dirty function that will extract the type from the filename, for the most common file types only. It would fail on other file types, or on URI's that had query parameters (and probably other cases I haven't thought of). You may prefer something more robust, and/or exposing yet another option to allow the user to set the type themselves.
I also added a demonstration of overriding the {% favicon %} block to the custom-template example, which shows how to recreate the inlined svg favicon that was originally in use.
Finally, I made one of the snapshot examples use the favicon option (and updated the outputs of all snapshots).