A badge that says what a post is about
Every post wears a date badge with an icon in it, and the icon says what kind of post it is: text, a picture, a video, a quote. On a blog where nearly everything is text, that icon is the same on nearly every card. Somebody running this engine put it plainly in issue #45: one sees the generic icon so often that it becomes invisible, or clutter.
1.6 lets a tag carry an icon instead.
tag_icons:
- tag: "build"
icon_svg: '<svg viewBox="0 0 24 24" …>…</svg>'
- tag: "comments"
icon: "chat"
It replaces rather than adds
On a post's date badge the tag's icon takes the place of the content-type icon; in the heading of /tag/<name>/ it takes the place of the generic tag icon. That was the requester's first point, and the one worth asking about rather than guessing: two icons side by side on a 60-pixel badge is not a badge, it is a puzzle. A tag with no entry changes nothing, so the generic icon is still there for everything you have not named.
The order is the priority
Most posts carry more than one tag — 68% of them on the archive this was measured against — so tag_icons is a list, and the first entry a post matches is the one it wears. That rule was chosen because the tag a post was given first is usually an importer's rather than a subject: twitter alone opens 1,256 posts on that archive. The order in your config is your order, not the post's.
Eight by name, or your own
icon names one of the eight the engine ships — text, quote, chat, image, video, audio, link, document. icon_svg is yours: drawn on the same 24-unit grid, stroked in currentColor so it follows the light and dark themes, with scripts, styles and event handlers stripped before it reaches a page. doctor checks every entry: whether the name is one the engine has, whether a hand-written SVG contains an <svg> at all, and whether it is drawn to the same scale as the rest. An unknown name used to draw an empty space and say nothing.
On this site, since today
The seven tags in this site's menu have icons now — a bulb for Why, a pen for Writing, a box for Archive, a spanner for Engine, the engine's own chat icon for Comments, an eye for Looks, a package for Releases. Look at the badge on the left of this post, then at the badges on the front page, and you will see the rule at work: a post tagged appearance, content wears the eye, because appearance is named and content is not.
The whole thing was asked for by one person, shaped by his three points, and shipped with the request still open so he could say where it was wrong. He did not have to.

Comments