MyST plugin to render inline icons via the Iconify API. This is a lightweight service that connects with many different icon sets out there. It provides access to 200,000+ icons from 100+ icon sets (Material Design, FontAwesome, etc.).
Note
Right now, this will embed a base64 encoded image for each icon. Each is small (about .2-1kb per icon, depending on its complexity), but eventually we'd like to include these are files and re-use them. See this issue on plugins defining their own outputs and when it is resolved we'll implement that here.
Add the plugin to your myst.yml - this always uses the latest release:
project:
plugins:
- https://github.com/choldgraf/myst-iconify/releases/latest/download/index.mjsTo pin a specific version, use the release tag:
project:
plugins:
- https://github.com/choldgraf/myst-iconify/releases/download/v0.1.0/index.mjsUse the {icon} role with an Iconify icon identifier (prefix:name):
{icon}`mdi:home` Home page
{icon}`fa6-solid:star` Favorite
{icon}`home` also works (defaults to mdi prefix)Browse available icons at https://icon-sets.iconify.design
Add the plugin to your myst.yml - the config below always uses the latest release:
project:
plugins:
- https://github.com/choldgraf/myst-iconify/releases/latest/download/index.mjsTo pin a specific version, use the release tag:
project:
plugins:
- https://github.com/choldgraf/myst-iconify/releases/download/v0.1.0/index.mjsIcons fetched from the Iconify API are cached in _build/cache/iconify/. Delete the cache directory to re-fetch:
rm -rf _build/cache/iconify/npm install
npm run buildIcons are fetched from the Iconify API at build time, then cached/embedded as inline SVGs that are base64-encoded.
Releases are cut by publishing a GitHub release.
The release.yml workflow then runs the test suite, bundles dist/index.mjs, and attaches it to the release as an asset.
-
Bump
versioninpackage.jsonto match the new release (e.g.,0.2.0). -
Commit and push the bump.
-
Create a release with a matching
v-prefixed tag and auto-generated notes:gh release create v0.2.0 --generate-notes
-
Wait for the
release.ymlworkflow to finish. It uploadsdist/index.mjsto the release.