docs: add known limitations (#45)

This commit is contained in:
Robert Kaussow 2021-05-23 23:09:59 +02:00 committed by GitHub
parent c9ab88ea8d
commit 44c4bf335e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 0 deletions

View File

@ -29,3 +29,5 @@ Netlify
Makefile Makefile
prebuilt prebuilt
(S|s)ubdirector(ies|y) (S|s)ubdirector(ies|y)
(M|m)inify
whitespace

View File

@ -514,3 +514,18 @@ That's it! The theme will auto-load all available SVG sprites provided in the as
The theme bundles just a small set of hand crafted icons. The theme bundles just a small set of hand crafted icons.
{{< sprites >}} {{< sprites >}}
## Known Limitations
### Minify HTML results in spacing issues
Using `hugo --minify` without further configuration or using other minify tools that also minify HTML files might result in spacing issues in the theme and is **not** supported.
After some testing we decided to not spend effort to fix this issue for now as the benefit is very low. There are some parts of the theme where spaces between HTML elements matters but were stripped by minify tools. Some of these issues are related to <!-- spellchecker-disable -->[gohugoio/hugo#6892](https://github.com/gohugoio/hugo/issues/6892).<!-- spellchecker-enable --> While recommendation like "don't depend on whitespace in your layout" sounds reasonable, it seems to be not that straight forward especially for something like embedded icons into the text flow.
If you still want to use Hugo's minify flag you should at least exclude HTML file in your site [configuration](https://gohugo.io/getting-started/configuration/#configure-minify):
```toml
[minify]
disableHTML = true
```