Skip to content

Speed up local development (git + Hugo)#284

Merged
jeroenjanssens merged 4 commits into
mainfrom
dev-speedups
May 28, 2026
Merged

Speed up local development (git + Hugo)#284
jeroenjanssens merged 4 commits into
mainfrom
dev-speedups

Conversation

@jeroenjanssens
Copy link
Copy Markdown
Collaborator

@jeroenjanssens jeroenjanssens commented May 28, 2026

This PR tremendously speeds up local hugo and gives tips for speeding up git with this big repo in the README. Production environment is not affected.

  • Git speed-ups: documents fsmonitor, untrackedCache, and git maintenance start in the README
  • Hugo speed-ups: moves config to config/ directory structure and adds a config/development/hugo.toml that excludes blog/ported/ and resources/videos/ — reduces dev build from ~7400 pages / 7.7s to ~1250 pages / 0.9s

Excludes blog/ported/ and resources/videos/ during local development
to speed up hugo server. Production builds are unaffected.
Moves hugo.toml to config/_default/hugo.toml and adds
config/development/hugo.toml which excludes blog/ported/ and
resources/videos/ during local development (17 pages vs 7440).
Hugo server uses the development environment by default.
Module mounts with the new `files` syntax didn't work correctly.
Switch to ignoreFiles (which does work) and change errorf to warnf
with early return in item.html so excluded content doesn't cause
fatal build errors.
@netlify
Copy link
Copy Markdown

netlify Bot commented May 28, 2026

Deploy Preview for posit-open-source canceled.

Name Link
🔨 Latest commit fe93ceb
🔍 Latest deploy log https://app.netlify.com/projects/posit-open-source/deploys/6a180cd5d8fabb0008e26c15

@github-actions
Copy link
Copy Markdown

@jeroenjanssens jeroenjanssens merged commit 606dabc into main May 28, 2026
12 checks passed
@jeroenjanssens jeroenjanssens deleted the dev-speedups branch May 28, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant