bluerobotics / bluerobotics/bluetheme

Add support for SVG icons

Open
#39 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
5
Forks
3
PR merge metrics
No merged PRs in 30d

Description

It would be nice to be able to import and inline SVG files via a shortcode.

It seems reasonable to not need to meaningfully parse or modify the actual file (e.g. we can assume it includes things like `fill="currentColor"` internally on relevant path components), but it would be nice to include a CSS `icon` class with properties like `width:24px;height:24px;display:inline`.

---

For context, I'm wanting to include things like menu item icons in the headings of the corresponding documentation. It may work to do that via an iconify plugin for tailwind (instead of specifically handling custom SVG files and including the relevant individual files in the relevant docs repo), but I'm not sure whether they would then not be the colour of the surrounding text, which would be a problem, and I don't love the idea of importing thousands of icons when only a few are needed. That would also be insufficient if the softwares are using any custom icons that we want to reproduce in the docs.

Contributor guide

No contributing guide indexed for this repository

Research direction

No file or test is named in the issue. Start by locating the theme's existing shortcode handling and how its styles and static assets are included; done means a selected SVG can be inlined without modifying it, receives the requested icon styling, and renders correctly in documentation headings.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, javascript
Domain
documentation, web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.