twbs / icons

Official open source SVG icon library for Bootstrap.
https://icons.getbootstrap.com
MIT License
7.36k stars 1.06k forks source link

Provide JSON file with meta data #1384

Open CreativeDive opened 2 years ago

CreativeDive commented 2 years ago

Hey, I want to use the bootstrap icons server side rendered. I'm looking for a solution to get all the icons from a JSON file, which provides the SVG path and meta data, like search terms:

[icon] => Array
                (
                    [paths] => Array
                        (
                            [0] => M584.923 1014.912c6.272 6.272 14.527 9.407 22.719 9.343 8.255 0 16.447-3.072 22.719-9.343l123.256-123.256c12.479-12.479 12.479-32.766 0-45.245s-32.766-12.479-45.245 0l-68.412 68.412v-562.525c0-17.663-14.335-31.998-31.998-31.998s-31.998 14.335-31.998 31.998v563.165l-73.723-73.723c-12.479-12.479-32.766-12.479-45.245 0s-12.479 32.766 0 45.245l127.928 127.928zM415.974 704.276c17.663 0 31.998-14.335 31.998-31.998v-563.165l73.723 73.723c12.479 12.479 32.766 12.479 45.245 0s12.479-32.766 0-45.245l-127.928-127.928c-6.272-6.272-14.463-9.343-22.719-9.343s-16.447 3.072-22.719 9.343l-123.256 123.256c-12.479 12.479-12.479 32.766 0 45.245s32.766 12.479 45.245 0l68.412-68.412v562.525c0 17.663 14.335 31.998 31.998 31.998z
                        )
                    [tags] => Array
                        (
                            [0] => search-term-1
                            [1] => search-term-2
                            [2] => search-term-3
                            [3] => search-term-4
                        )
korki43 commented 1 year ago

Duplicate of #1342.