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

--minify breaks svgs #33

Open
pocc opened this issue Jul 25, 2019 · 3 comments · Fixed by gohugoio/hugo#6403
Open

--minify breaks svgs #33

pocc opened this issue Jul 25, 2019 · 3 comments · Fixed by gohugoio/hugo#6403
Labels
upstream Upstream issue in Hugo, Learn, or smtg else

Comments

@pocc
Copy link
Owner

pocc commented Jul 25, 2019

This was recognized as an issue in minify and was fixed in v2.5.1.

Now we just need to wait for it to percolate into hugo versions so that in netlify commands, --minify can be specified.

@pocc pocc added Hugo Shortcodes, partials, etc. upstream Upstream issue in Hugo, Learn, or smtg else and removed Hugo Shortcodes, partials, etc. labels Jul 25, 2019
anthonyfok added a commit to anthonyfok/hugo that referenced this issue Oct 9, 2019
- v2.5.1 removes import comments, solving a build error with Go 1.13
  in GOPATH mode (used Debian packaging for example)
- v2.5.2 no longer converts polyline/rect/polygon/line to path
  as it has been reported to break a SVG referenced by CSS,
  see tdewolff/minify#260

The test case for Min SVG in TestResourceChains is updated accordingly.

Fixes pocc/tshark.dev#33
@anthonyfok
Copy link

This was recognized as an issue in minify and was fixed in v2.5.1.

This was actually fixed 5 days after minify v2.5.1 was released, so the version we want is v2.5.2.

As a Hugo contributor, I came across your issue very accidentally, starting with minify before v2.5.1 not building with Go 1.13 in GOPATH mode (for Debian packaging), and then with a failing Hugo minify SVG test due to the fix for tdewolff/minify#260. If it weren't for these two "accidents", we might have never seen this issue at all!

No, dependencies like minify do not percolate into Hugo automatically, and that is how Go modules work by default. After all, "when it ain't broke, don't fix it". So, next time, please do not hesitate to file an issue over at gohugoio/hugo, or we might never see it. Cheers!

bep pushed a commit to gohugoio/hugo that referenced this issue Oct 9, 2019
- v2.5.1 removes import comments, solving a build error with Go 1.13
  in GOPATH mode (used Debian packaging for example)
- v2.5.2 no longer converts polyline/rect/polygon/line to path
  as it has been reported to break a SVG referenced by CSS,
  see tdewolff/minify#260

The test case for Min SVG in TestResourceChains is updated accordingly.

Fixes pocc/tshark.dev#33
@pocc
Copy link
Owner Author

pocc commented Oct 9, 2019

Genius! Thanks so much @anthonyfok.

Will close this once hugo has a tagged version that can be pushed to and tested on netlify.

@pocc pocc closed this as completed in e97472e Feb 26, 2020
pocc added a commit that referenced this issue Feb 26, 2020
Minify made a fix in tdewolff/minify#260, which is then upstreamed as
gohugoio/hugo#6403 (v0.59.0)
pocc added a commit that referenced this issue Feb 26, 2020
Minify made a fix in tdewolff/minify#260, which is then upstreamed as
gohugoio/hugo#6403 (v0.59.0)
pocc added a commit that referenced this issue Feb 26, 2020
Minify made a fix in tdewolff/minify#260, which is then upstreamed as
gohugoio/hugo#6403 (v0.59.0)
@pocc
Copy link
Owner Author

pocc commented Feb 26, 2020

Now held up by tdewolff/minify#291

@pocc pocc reopened this Feb 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream Upstream issue in Hugo, Learn, or smtg else
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants