-
Notifications
You must be signed in to change notification settings - Fork 170
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
Support importing a svg into the SVG object #57
Comments
I suppose this could be achieved two fold, by writing a partial svg to the writer before using svgo, or embedding the svg, especially as the target for this library is generation specifically. Curious to know what your thoughts are on this, and if it's out of scope, feel free to close the issue :). Thanks for the great lib 😀 |
See: https://github.com/ajstarks/svgo/blob/master/codepic/codepic.go for an approach to this. |
Hey @ajstarks the placepic solution is really elegant! Thanks for writing it. Would you be open if I opened a PR that is a bit more simplified version of it that focuses more on embedding an svg within another? Perhaps under the name |
sure, I'm ok with reviewing embed.go. |
This commit adds the embed.go example, which focuses on demonstrating how to embed an svg within another. The example adds a title and a red border around the svg file provided via the -f argument. Closes ajstarks#57.
Would be really cool if we could get functionality that allowed us to take an already existing svg (a file, for example) and import it into svgo and modify it!
This would be really helpful when working with large preexisting svgs and adding dynamic content on top of it :)
Here how I envision it to be used:
The text was updated successfully, but these errors were encountered: