You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When setting minify_html = true in config.toml, it is expected that the entire generated HTML file would be minified, as mentioned in the documentation for the minify_html:
"When set to "true", the generated HTML files are minified."
For example, the following code block:
<!doctype html><html><head><metacharset="utf-8"><style>p {
color: white;
margin-left:10000px;
}
</style><script>alert("Hello World!");console.log("Some information: %o",information);</script></head><body><p>Example blog post</p>
FOO BAR
</body></html>
Should create this:
<!doctype html><html><head><metacharset=utf-8><style>p{color:#fff;margin-left:10000px}</style><script>alert("Hello World!"),console.log("Some information: %o",information);</script><body><p>Example blog post</p> FOO BAR
Current Behavior
Currently, embedded CSS and JavaScript (in things such as <style> and <script> tags) are not minified. For example, the following code block:
<!doctype html><html><head><metacharset="utf-8"><style>p {
color: white;
margin-left:10000px;
}
</style><script>alert("Hello World!");console.log("Some information: %o",information);</script></head><body><p>Example blog post</p>
FOO BAR
</body></html>
Creates this:
<!doctype html><html><head><metacharset=utf-8><style>p {
color: white;
margin-left:10000px;
}</style><script>alert("Hello World!");console.log("Some information: %o",information);</script><body><p>Example blog post</p> FOO BAR
Step to reproduce
Include embedded CSS or JS in an HTML template
Set minify_html = true in config.toml
Inspect the output of zola build
The text was updated successfully, but these errors were encountered:
Bug Report
Environment
Zola version: 0.15.3
Expected Behavior
When setting
minify_html = true
inconfig.toml
, it is expected that the entire generated HTML file would be minified, as mentioned in the documentation for theminify_html
:"When set to "true", the generated HTML files are minified."
For example, the following code block:
Should create this:
Current Behavior
Currently, embedded CSS and JavaScript (in things such as <style> and <script> tags) are not minified. For example, the following code block:
Creates this:
Step to reproduce
minify_html = true
inconfig.toml
zola build
The text was updated successfully, but these errors were encountered: