Loosing spaces on Hugo build

I have a site up at https://saidaspen.se generated by Hugo.
For some reason when I deploy that on Netlify I loose spaces around any <strong> tags that I have. I suspect it is some of the minififiers that messes things up, but I cannot figure out what the problem is.

Anyone know what this might be, and how I can solve it?

Here is an image from the site deployed on Netlify:

It looks good when I build it locally with the same version of Hugo.

Here is a build log:

10:09:05 PM: Build ready to start
10:09:07 PM: build-image version: d84c79427e8f83c1ba17bcdd7b3fe38059376b68
10:09:07 PM: build-image tag: v3.6.1
10:09:07 PM: buildbot version: 2e994c874dd551982059545cd109ce3b21bce257
10:09:07 PM: Fetching cached dependencies
10:09:07 PM: Starting to download cache of 235.9MB
10:09:12 PM: Finished downloading cache in 4.633166273s
10:09:12 PM: Starting to extract cache
10:09:21 PM: Finished extracting cache in 9.566735683s
10:09:21 PM: Finished fetching cache in 14.294250645s
10:09:21 PM: Starting to prepare the repo for build
10:09:22 PM: Preparing Git Reference refs/heads/master
10:09:24 PM: Starting build script
10:09:24 PM: Installing dependencies
10:09:24 PM: Python version set to 2.7
10:09:25 PM: Started restoring cached node version
10:09:29 PM: Finished restoring cached node version
10:09:30 PM: v12.18.0 is already installed.
10:09:31 PM: Now using node v12.18.0 (npm v6.14.4)
10:09:31 PM: Started restoring cached build plugins
10:09:31 PM: Finished restoring cached build plugins
10:09:31 PM: Attempting ruby version 2.7.1, read from environment
10:09:34 PM: Using ruby version 2.7.1
10:09:34 PM: Using PHP version 5.6
10:09:34 PM: Installing Hugo 0.74.3
10:09:34 PM: Hugo Static Site Generator v0.74.3-DA0437B4/extended linux/amd64 BuildDate: 2020-07-23T16:30:30Z
10:09:34 PM: Started restoring cached go cache
10:09:34 PM: Finished restoring cached go cache
10:09:34 PM: go version go1.14.4 linux/amd64
10:09:34 PM: go version go1.14.4 linux/amd64
10:09:34 PM: Installing missing commands
10:09:34 PM: Verify run directory
10:09:37 PM: ​
10:09:37 PM: ────────────────────────────────────────────────────────────────
10:09:37 PM:   Netlify Build                                                 
10:09:37 PM: ────────────────────────────────────────────────────────────────
10:09:37 PM: ​
10:09:37 PM: ❯ Version
10:09:37 PM:   @netlify/build 8.1.0
10:09:37 PM: ​
10:09:37 PM: ❯ Flags
10:09:37 PM:   deployId: 60074a711da5f00f5270e119
10:09:37 PM:   mode: buildbot
10:09:37 PM: ​
10:09:37 PM: ❯ Current directory
10:09:37 PM:   /opt/build/repo
10:09:37 PM: ​
10:09:37 PM: ❯ Config file
10:09:37 PM:   No config file was defined: using default values.
10:09:37 PM: ​
10:09:37 PM: ❯ Context
10:09:37 PM:   production
10:09:37 PM: ​
10:09:37 PM: ❯ Loading plugins
10:09:37 PM:    - netlify-plugin-checklinks@4.1.1 from Netlify app
10:09:37 PM:    - netlify-plugin-image-optim@0.4.0 from Netlify app
10:09:37 PM:    - netlify-plugin-inline-critical-css@1.1.3 from Netlify app
10:09:37 PM:    - netlify-plugin-inline-source@1.0.4 from Netlify app
10:09:37 PM:    - netlify-plugin-minify-html@0.3.0 from Netlify app
10:09:37 PM:    - netlify-plugin-subfont@5.0.3 from Netlify app
10:09:46 PM: ​
10:09:46 PM: ────────────────────────────────────────────────────────────────
10:09:46 PM:   1. Build command from Netlify app                             
10:09:46 PM: ────────────────────────────────────────────────────────────────
10:09:46 PM: ​
10:09:46 PM: $ hugo
10:09:47 PM: Building sites …
10:09:47 PM:                    | EN
10:09:47 PM: -------------------+-----
10:09:47 PM:   Pages            | 19
10:09:47 PM:   Paginator pages  |  0
10:09:47 PM:   Non-page files   | 14
10:09:47 PM:   Static files     | 13
10:09:47 PM:   Processed images |  0
10:09:47 PM:   Aliases          |  7
10:09:47 PM:   Sitemaps         |  1
10:09:47 PM:   Cleaned          |  0
10:09:47 PM: Total in 127 ms
10:09:47 PM: ​
10:09:47 PM: (build.command completed in 426ms)
10:09:47 PM: ​
10:09:47 PM: ────────────────────────────────────────────────────────────────
10:09:47 PM:   2. onPostBuild command from netlify-plugin-checklinks         
10:09:47 PM: ────────────────────────────────────────────────────────────────
10:09:47 PM: ​
10:09:48 PM: .................................
10:09:48 PM:   33 tests
10:09:48 PM:   33 passed
10:09:48 PM: ​
10:09:48 PM: (netlify-plugin-checklinks onPostBuild completed in 1.4s)
10:09:48 PM: ​
10:09:48 PM: ────────────────────────────────────────────────────────────────
10:09:48 PM:   3. onPostBuild command from netlify-plugin-image-optim        
10:09:48 PM: ────────────────────────────────────────────────────────────────
10:09:48 PM: ​
10:10:17 PM: β”‚ File                                                                      β”‚ Before    β”‚ After     β”‚ Reduction β”‚
10:10:17 PM: β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
10:10:17 PM: β”‚ /fonts/icomoon.svg                                                        β”‚ 4.3 KB    β”‚ 3.9 KB    β”‚ 408 B     β”‚
10:10:17 PM: β”‚ /site/author.jpg                                                          β”‚ 9.04 KB   β”‚ 8.94 KB   β”‚ 100 B     β”‚
10:10:17 PM: β”‚ /site/logo.svg                                                            β”‚ 976 B     β”‚ 527 B     β”‚ 449 B     β”‚
10:10:17 PM: β”‚ /site/logo_32x32.png                                                      β”‚ 1.65 KB   β”‚ 1.19 KB   β”‚ 468 B     β”‚
10:10:17 PM: β”‚ /posts/ai-collapse/img/ai-collapse_hypecycle.png                          β”‚ 26.02 KB  β”‚ 11.91 KB  β”‚ 14.1 KB   β”‚
10:10:17 PM: β”‚ /posts/ai-collapse/img/ai-collapse_main.png                               β”‚ 668.32 KB β”‚ 283.88 KB β”‚ 384.43 KB β”‚
10:10:17 PM: β”‚ /posts/ai-collapse/img/ai-collapse_searchresult.png                       β”‚ 17.41 KB  β”‚ 7.16 KB   β”‚ 10.25 KB  β”‚
10:10:17 PM: β”‚ /posts/my-journey-applying-ai/img/horse-racing_flatbet.png                β”‚ 96.37 KB  β”‚ 51.12 KB  β”‚ 45.25 KB  β”‚
10:10:17 PM: β”‚ /posts/my-journey-applying-ai/img/horse-racing_gdp.png                    β”‚ 599.2 KB  β”‚ 178.82 KB β”‚ 420.39 KB β”‚
10:10:17 PM: β”‚ /posts/my-journey-applying-ai/img/horse-racing_github.png                 β”‚ 48.53 KB  β”‚ 17.78 KB  β”‚ 30.75 KB  β”‚
10:10:17 PM: β”‚ /posts/my-journey-applying-ai/img/horse-racing_horse.jpg                  β”‚ 139.69 KB β”‚ 137.37 KB β”‚ 2.32 KB   β”‚
10:10:17 PM: β”‚ /posts/my-journey-applying-ai/img/horse-racing_hypecycle.png              β”‚ 87.59 KB  β”‚ 39.96 KB  β”‚ 47.63 KB  β”‚
10:10:17 PM: β”‚ /posts/my-journey-applying-ai/img/horse-racing_kaggle.png                 β”‚ 60.31 KB  β”‚ 23.79 KB  β”‚ 36.51 KB  β”‚
10:10:17 PM: β”‚ /posts/my-journey-applying-ai/img/horse-racing_mt.png                     β”‚ 175.92 KB β”‚ 55.9 KB   β”‚ 120.02 KB β”‚
10:10:17 PM: β”‚ /posts/my-journey-applying-ai/img/horse-racing_stp.png                    β”‚ 134.45 KB β”‚ 64.09 KB  β”‚ 70.36 KB  β”‚
10:10:17 PM: β”‚ /posts/my-journey-applying-ai/img/horse-racing_study.png                  β”‚ 567.14 KB β”‚ 158.66 KB β”‚ 408.48 KB β”‚
10:10:17 PM: β”‚ /posts/unit-testing_enlightenment/img/unit_testing-bar.png                β”‚ 3.08 KB   β”‚ 1.23 KB   β”‚ 1.84 KB   β”‚
10:10:17 PM: β”‚ /posts/unit-testing_enlightenment/img/unit_testing-enlightenment_1000.jpg β”‚ 72.72 KB  β”‚ 62.43 KB  β”‚ 10.29 KB  β”‚
10:10:17 PM: β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
10:10:17 PM: β”‚   Images optimized - 1.57 MB saved   β”‚
10:10:17 PM: β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
10:10:17 PM: ​
10:10:17 PM: (netlify-plugin-image-optim onPostBuild completed in 28.6s)
10:10:17 PM: ​
10:10:17 PM: ──────────────────────────────────────────────────────────────────
10:10:17 PM:   4. onPostBuild command from netlify-plugin-inline-critical-css  
10:10:17 PM: ──────────────────────────────────────────────────────────────────
10:10:17 PM: ​
10:10:36 PM: Critical CSS successfully inlined!
10:10:36 PM: ​
10:10:36 PM: (netlify-plugin-inline-critical-css onPostBuild completed in 19s)
10:10:36 PM: ​
10:10:36 PM: ────────────────────────────────────────────────────────────────
10:10:36 PM:   5. onPostBuild command from netlify-plugin-inline-source      
10:10:36 PM: ────────────────────────────────────────────────────────────────
10:10:36 PM: ​
10:10:36 PM: Sources successfully inlined!
10:10:36 PM: ​
10:10:36 PM: (netlify-plugin-inline-source onPostBuild completed in 31ms)
10:10:36 PM: ​
10:10:36 PM: ────────────────────────────────────────────────────────────────
10:10:36 PM:   6. onPostBuild command from netlify-plugin-minify-html        
10:10:36 PM: ────────────────────────────────────────────────────────────────
10:10:36 PM: ​
10:10:36 PM: Minifiying HTML in the deploy context: production
10:10:36 PM: Minifiying HTML with these options: Default
10:10:36 PM: ​
10:10:36 PM: (netlify-plugin-minify-html onPostBuild completed in 460ms)
10:10:36 PM: ​
10:10:36 PM: ────────────────────────────────────────────────────────────────
10:10:36 PM:   7. onPostBuild command from netlify-plugin-subfont            
10:10:36 PM: ────────────────────────────────────────────────────────────────
10:10:36 PM: ​
10:10:36 PM: Running subfont version 5.2.5
10:10:36 PM:  βœ” 0.001 secs: logEvents
10:10:37 PM:  βœ” 0.497 secs: loadAssets
10:10:39 PM:  βœ” 1.696 secs: populate
10:10:39 PM:  βœ” 0.022 secs: checkIncompatibleTypes
10:10:39 PM:  βœ” 0.047 secs: applySourceMaps
10:10:39 PM:  βœ” 0.087 secs: populate
10:10:45 PM:  β„Ή INFO: Local subsetting is not possible because fonttools are not installed. Falling back to only subsetting Google Fonts. Run `pip install fonttools brotli zopfli` to enable local font subsetting
10:10:45 PM:  β„Ή INFO: Unoptimised fonts:
10:10:45 PM:           - public/fonts/icomoon.woff
10:10:45 PM:           - public/fonts/icomoon.woff
10:10:45 PM:           - public/fonts/icomoon.woff
10:10:45 PM:           - public/fonts/icomoon.woff
10:10:45 PM:           - public/fonts/icomoon.woff
10:10:45 PM:           - public/fonts/icomoon.woff
10:10:45 PM:           - public/fonts/icomoon.woff
10:10:45 PM:           - public/fonts/icomoon.woff
10:10:45 PM:  βœ” 0.137 secs: compressJavaScript
10:10:45 PM:  βœ” 0.032 secs: writeAssetsToDisc
10:10:45 PM: HTML/JS/CSS size increase: 4.63 kB
10:10:45 PM: Total savings: -4.63 kB
10:10:45 PM: Output written to file:///opt/build/repo/public/
10:10:45 PM: ​
10:10:45 PM: (netlify-plugin-subfont onPostBuild completed in 9.1s)
10:10:46 PM: ​
10:10:46 PM: ────────────────────────────────────────────────────────────────
10:10:46 PM:   Netlify Build Complete                                        
10:10:46 PM: ────────────────────────────────────────────────────────────────
10:10:46 PM: ​
10:10:46 PM: (Netlify Build completed in 1m 8.7s)
10:10:46 PM: Caching artifacts
10:10:46 PM: Started saving build plugins
10:10:46 PM: Finished saving build plugins
10:10:46 PM: Started saving pip cache
10:10:46 PM: Finished saving pip cache
10:10:46 PM: Started saving emacs cask dependencies
10:10:46 PM: Finished saving emacs cask dependencies
10:10:46 PM: Started saving maven dependencies
10:10:46 PM: Finished saving maven dependencies
10:10:46 PM: Started saving boot dependencies
10:10:46 PM: Finished saving boot dependencies
10:10:46 PM: Started saving rust rustup cache
10:10:46 PM: Finished saving rust rustup cache
10:10:46 PM: Started saving go dependencies
10:10:46 PM: Finished saving go dependencies
10:10:46 PM: Build script success
10:10:46 PM: Starting to deploy site from 'public'
10:10:46 PM: Creating deploy tree 
10:10:46 PM: Creating deploy upload records
10:10:46 PM: 0 new files to upload
10:10:46 PM: 0 new functions to upload
10:10:46 PM: Starting post processing
10:10:46 PM: Post processing - HTML
10:10:46 PM: Post processing - header rules
10:10:47 PM: Post processing - redirect rules
10:10:47 PM: Post processing done
10:10:47 PM: Site is live ✨

It is probably this. I had something similar on my Gatsby website. However, Hugo has an in-built minifier with hugo --minify command. You probably don’t need any external dependency.

ok, thanks! But how do I get rid of it? How do I turn that off?

Edit: I found it, it was a plugin, apparently, that I have no recollection of ever setting up.
Removed it, and that did in fact fix the issue. Thank!

1 Like