Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add icon markup #83

Open
michaeltlombardi opened this issue Apr 16, 2023 · 0 comments
Open

Add icon markup #83

michaeltlombardi opened this issue Apr 16, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@michaeltlombardi
Copy link
Contributor

As an author, I want to be able to use icons in my Markdown without having to know how to install icon fonts or libraries and add them to my site's assets or call them with inline HTML.

Suggested Implementation

Add an image link render hook for Markdown images whose alt text as the icon: prefix, like:

![icon:name](library "label text")
{ ... }

The text after the icon represents the icon's name. The library is optional and indicates which icon library to search for that name in. The label text, if included, marks the icon as non-decoration and adds the specified label.

Details

The markup should:

  • Support presets, where the preset dot-path is specified instead of the library with the preset:dot-path syntax or as an attribute
  • Support registering any known library automatically and registering custom libraries in the configuration. When no library is specified, or is specified as a dot (.), we should use the default library from Shoelace.
  • Be integrated with other markup that uses Shoelace icons, so the registration/handling for icons is generic across markup
  • Add a footer note about used icons and their license and update a list of used icons that can be rendered anywhere in the site as needed (like a typography page). These should be configurable.

In this first iteration, we don't need to make icons available without an active internet connection. In the future, we should define a pattern for icon modules that vendor the icons with their schemas etc so they can be used more reliably. In this first iteration, we don't need to verify that the icon exists at parse/build time.

@michaeltlombardi michaeltlombardi added the enhancement New feature or request label Apr 16, 2023
@michaeltlombardi michaeltlombardi self-assigned this Apr 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant