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

FEATURE: support custom icons in themes #7155

Merged
merged 6 commits into from Mar 15, 2019

Conversation

@pmusaraj
Copy link
Contributor

commented Mar 12, 2019

This enables developers to add their own custom icons in their themes. To do so, simply add an SVG sprite file in your assets, and reference it in about.json, like so:

"assets": {
    "icons-sprite": "assets/icons-sprite.svg"
}

The sprite file should contain a list of <symbol> elements with ids, each of which will be automatically registered and added to the site's icon set.

This PR also automatically registers any custom icons added via plugins.

pmusaraj added some commits Feb 7, 2019

Add support for sprites in themes
Automatically register any custom icons added via themes or plugins

@pmusaraj pmusaraj requested a review from davidtaylorhq Mar 12, 2019

@discoursebot

This comment has been minimized.

Copy link

commented Mar 12, 2019

You've signed the CLA, pmusaraj. Thank you! This pull request is ready for review.

@SamSaffron

This comment has been minimized.

Copy link
Member

commented Mar 13, 2019

Happy to have this feature! once merged please update various theme documentation on meta!

@davidtaylorhq can you review this?

@davidtaylorhq
Copy link
Member

left a comment

Looks great to me, just one small comment 😄

Update lib/svg_sprite/svg_sprite.rb
Co-Authored-By: pmusaraj <pmusaraj@gmail.com>
@discoursebot

This comment has been minimized.

Copy link

commented Mar 13, 2019

This pull request has been mentioned on Discourse Meta. There might be relevant details there:

https://meta.discourse.org/t/category-icons-component/104683/12

@SamSaffron SamSaffron merged commit d6d4a5b into discourse:master Mar 15, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
5 participants
You can’t perform that action at this time.