Skip to content

Commit 9e1d8e5

Browse files
authored
Mention JSON-LD minification (#147)
1 parent 67d8196 commit 9e1d8e5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ Minifier options like `sortAttributes` and `sortClassName` won't impact the plai
123123

124124
If you have chunks of markup you would like preserved, you can wrap them `<!-- htmlmin:ignore -->`.
125125

126+
### Minifying JSON-LD
127+
128+
You can minify script tags with JSON-LD by setting the option `{ processScripts: ['application/ld+json'] }`. Note that this minification is very rudimentary, it is mainly useful for removing newlines and excessive whitespace.
129+
126130
### Preserving SVG tags
127131

128132
SVG tags are automatically recognized, and when they are minified, both case-sensitivity and closing-slashes are preserved, regardless of the minification settings used for the rest of the file.

0 commit comments

Comments
 (0)