/inline-svg

Official inline SVG integration for Hyas

Primary LanguageHTMLMIT LicenseMIT

Hyas inline SVG

Official inline SVG integration for Hyas.

Status

npm (scoped)

Installation

npm i @hyas/inline-svg

Icon set

Optionally, install one or more icon sets, e.g., Tabler Icons and Bootstrap Icons:

npm i @tabler/icons bootstrap-icons

Setup

Add mounts to ./config/_default/module.toml:

[[mounts]]
  source = "node_modules/bootstrap-icons/icons"
  target = "assets/svgs/bootstrap-icons"

[[mounts]]
  source = "node_modules/@tabler/icons/icons"
  target = "assets/svgs/tabler-icons"

[[mounts]]
  source = "node_modules/@hyas/inline-svg/layouts"
  target = "layouts"

[[mounts]]
  source = "assets"
  target = "assets"

[[mounts]]
  source = "layouts"
  target = "layouts"

Set the default icon set directory in ./config/_default/params.toml:

# Inline SVG (@hyas/inline-svg)
[inline_svg]
  iconSetDir = "tabler-icons" # "tabler-icons" (default)

How to use

See the Hyas documentation:

Credits

This npm package is based on the Hugo module: