Specify icon for each artifact.

Description

We need a way to indicate an icon for each artifact. There are many uses for icons, but particularly they are needed in generated menu items for artifacts.

A page will indicate its icon using the icon property in page metadata. The value will be in the form group/name, e.g. "fas/fa-home" or "material-icons/home" or "ion/home". Initially mummy:regenerate will have hard-coded recognition of Font Awesome and Material Icons (the first two examples). If no "group" is present, e.g. "⌂", the value itself is used.

A template can include an include an icon in a menu using mummy:regenerate by including <i></i> in the template text. This will be replaced with <span></span> using the page icon in the correct form. Initially mummy:regenerate will have hard-coded recognition of Font Awesome and Material Icons, and for literal font text.

(Note that it is debatable whether <i></i> or <span></span> is best for icons, but most seem to agree if not reluctantly that <i></i> is not correct. However it provides a good template replacement rather than inventing a new element. Note also that some tools like Blue Griffon break icons using <i></i>, so a workaround may be needed for editing the template with such an editor.)

Environment

None

Assignee

Garret Wilson

Reporter

Garret Wilson

Labels

None

Components

Fix versions

Priority

Major
Configure