shift-org / shift-docs

Shift2Bikes: website and calendar for shift and pedalpalooza
https://shift2bikes.org
Other
22 stars 17 forks source link

disable minify for local dev #786

Closed ionous closed 3 months ago

ionous commented 4 months ago

when developing locally having non-minified javascript makes debugging easier. hugo supports having separate configs for development and production by moving the config file into a config directory. https://gohugo.io/getting-started/configuration/#configuration-directory

a bit confusingly, hugo server automatically uses "development", but hugo --watch does not so i added -e development for those. ( note: i didn't change the default docker build. "hugo build" is production by default, and while technically only Netlify needs to be production, i figure that still gives a way to test/verify minification easily )

  1. adds -e to select the "development" environment for hugo watch ( npm run dev, and docker compose )
  2. move site/hugo.toml to site/config/_default/hugo.toml
  3. adds site/config/development/minify.toml to override the settings for dev mode
  4. updates the readme with the new configuration info