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

Hugo minify generates sizing problem on multilingual switch #298

Closed
ignaciocastro opened this issue Sep 21, 2022 · 1 comment
Closed

Hugo minify generates sizing problem on multilingual switch #298

ignaciocastro opened this issue Sep 21, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@ignaciocastro
Copy link

What happened?

Using the latest version of the theme, latest hugo on Netlify, when using the --minify option, this will generate a sizing problem, removing the space between the title and the language switch.

With --minify
chrome_NcP8lCJZ38

On hugo server and without using --minify
chrome_YUZQTBtSes

This problem is also reported when analyzing the webpage with web.dev

chrome_aYl3d9Br7j

This is fixed when modifying netlify.toml and removing the --minify option.

PS: My netlify.toml is modified to use the latest version of hugo + the latest version of go. This error is still happening on the default toml version.

Theme version

v2.3.1

Hugo version

v0.102.3

What browsers are you seeing the problem on?

Chrome

Relevant Hugo log output

10:50:01 PM: Build ready to start
10:50:03 PM: build-image version: d7b3dbfb0846505993c9a131894d1858074c90b4 (focal)
10:50:03 PM: build-image tag: v4.10.1
10:50:03 PM: buildbot version: 1c362ef848ac5e35535bdb572ebca893db28c8a0
10:50:03 PM: Fetching cached dependencies
10:50:03 PM: Starting to download cache of 135.9MB
10:50:04 PM: Finished downloading cache in 1.082591558s
10:50:04 PM: Starting to extract cache
10:50:05 PM: Finished extracting cache in 824.279799ms
10:50:05 PM: Finished fetching cache in 1.986041125s
10:50:05 PM: Starting to prepare the repo for build
10:50:05 PM: Preparing Git Reference refs/heads/main
10:50:06 PM: Parsing package.json dependencies
10:50:06 PM: Different build command detected, going to use the one specified in the Netlify configuration file: 'hugo mod get -u && hugo --gc --minify -b $URL' versus 'hugo mod get -u && hugo' in the Netlify UI
10:50:06 PM: Starting build script
10:50:06 PM: Installing dependencies
10:50:06 PM: Python version set to 2.7
10:50:06 PM: Started restoring cached node version
10:50:07 PM: Finished restoring cached node version
10:50:08 PM: v16.17.0 is already installed.
10:50:08 PM: Now using node v16.17.0 (npm v8.15.0)
10:50:08 PM: Started restoring cached build plugins
10:50:08 PM: Finished restoring cached build plugins
10:50:08 PM: Attempting ruby version 2.7.2, read from environment
10:50:09 PM: Using ruby version 2.7.2
10:50:09 PM: Using PHP version 8.0
10:50:09 PM: Installing Hugo 0.102.3
10:50:10 PM: hugo v0.102.3-b76146b129d7caa52417f8e914fc5b9271bf56fc+extended linux/amd64 BuildDate=2022-09-01T10:16:19Z VendorInfo=gohugoio
10:50:10 PM: Started restoring cached go cache
10:50:10 PM: Finished restoring cached go cache
10:50:10 PM: Installing Go version 1.19.1 (requested 1.19.1)
10:50:16 PM: unset GOOS;
10:50:16 PM: unset GOARCH;
10:50:16 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.19.1.linux.amd64';
10:50:16 PM: export PATH="/opt/buildhome/.gimme/versions/go1.19.1.linux.amd64/bin:${PATH}";
10:50:16 PM: go version >&2;
10:50:16 PM: export GIMME_ENV="/opt/buildhome/.gimme/env/go1.19.1.linux.amd64.env"
10:50:16 PM: go version go1.19.1 linux/amd64
10:50:16 PM: Installing missing commands
10:50:16 PM: Verify run directory
10:50:17 PM: ​
10:50:17 PM: ────────────────────────────────────────────────────────────────
10:50:17 PM:   Netlify Build                                                 
10:50:17 PM: ────────────────────────────────────────────────────────────────
10:50:17 PM: ​
10:50:17 PM: ❯ Version
10:50:17 PM:   @netlify/build 27.18.4
10:50:17 PM: ​
10:50:17 PM: ❯ Flags
10:50:17 PM:   baseRelDir: true
10:50:17 PM:   buildId: 632a6dc9a91c370008a14083
10:50:17 PM:   deployId: 632a6dc9a91c370008a14085
10:50:17 PM: ​
10:50:17 PM: ❯ Current directory
10:50:17 PM:   /opt/build/repo
10:50:17 PM: ​
10:50:17 PM: ❯ Config file
10:50:17 PM:   /opt/build/repo/netlify.toml
10:50:17 PM: ​
10:50:17 PM: ❯ Context
10:50:17 PM:   production
10:50:17 PM: ​
10:50:17 PM: ────────────────────────────────────────────────────────────────
10:50:17 PM:   1. build.command from netlify.toml                            
10:50:17 PM: ────────────────────────────────────────────────────────────────
10:50:17 PM: ​
10:50:17 PM: $ hugo mod get -u && hugo --gc --minify -b $URL
10:50:18 PM: Start building sites …
10:50:18 PM: hugo v0.102.3-b76146b129d7caa52417f8e914fc5b9271bf56fc+extended linux/amd64 BuildDate=2022-09-01T10:16:19Z VendorInfo=gohugoio
10:50:18 PM:                    | EN | ES
10:50:18 PM: -------------------+----+-----
10:50:18 PM:   Pages            | 12 |  8
10:50:18 PM:   Paginator pages  |  0 |  0
10:50:18 PM:   Non-page files   |  0 |  0
10:50:18 PM:   Static files     | 13 | 13
10:50:18 PM:   Processed images |  0 |  0
10:50:18 PM:   Aliases          |  3 |  1
10:50:18 PM:   Sitemaps         |  2 |  1
10:50:18 PM:   Cleaned          |  0 |  0
10:50:18 PM: Total in 70 ms
10:50:18 PM: ​
10:50:18 PM: (build.command completed in 364ms)
10:50:18 PM: ​
10:50:18 PM: ────────────────────────────────────────────────────────────────
10:50:18 PM:   2. Deploy site                                                
10:50:18 PM: ────────────────────────────────────────────────────────────────
10:50:18 PM: ​
10:50:18 PM: Starting to deploy site from 'public'
10:50:18 PM: Creating deploy tree 
10:50:18 PM: Creating deploy upload records
10:50:18 PM: 11 new files to upload
10:50:18 PM: 0 new functions to upload
10:50:18 PM: Site deploy was successfully initiated
10:50:18 PM: ​
10:50:18 PM: (Deploy site completed in 508ms)
10:50:18 PM: ​
10:50:18 PM: ────────────────────────────────────────────────────────────────
10:50:18 PM:   Netlify Build Complete                                        
10:50:18 PM: ────────────────────────────────────────────────────────────────
10:50:18 PM: ​
10:50:18 PM: (Netlify Build completed in 893ms)
10:50:18 PM: Starting post processing
10:50:18 PM: Caching artifacts
10:50:18 PM: Started saving build plugins
10:50:18 PM: Finished saving build plugins
10:50:18 PM: Started saving pip cache
10:50:18 PM: Finished saving pip cache
10:50:18 PM: Started saving emacs cask dependencies
10:50:18 PM: Finished saving emacs cask dependencies
10:50:18 PM: Started saving maven dependencies
10:50:19 PM: Finished saving maven dependencies
10:50:19 PM: Started saving boot dependencies
10:50:19 PM: Post processing - HTML
10:50:19 PM: Finished saving boot dependencies
10:50:19 PM: Started saving rust rustup cache
10:50:19 PM: Finished saving rust rustup cache
10:50:19 PM: Started saving go dependencies
10:50:19 PM: Finished saving go dependencies
10:50:19 PM: Build script success
10:50:19 PM: Uploading Cache of size 152.7MB
10:50:19 PM: Post processing - header rules
10:50:19 PM: Post processing - redirect rules
10:50:20 PM: Post processing done
10:50:20 PM: Finished processing build request in 17.684004733s
10:50:22 PM: Site is live ✨
@ignaciocastro ignaciocastro added the bug Something isn't working label Sep 21, 2022
@jpanther
Copy link
Owner

Thanks for the report. I'll address this in a future update.

@jpanther jpanther added the wip Work in progress label Nov 7, 2022
@jpanther jpanther removed the wip Work in progress label Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants