Go 2,551 FILES 8 FINDINGS

HOW HUGO
ACTUALLY WORKS

The world's fastest framework for building websites. Conventions, patterns, and architecture extracted from the gohugoio/hugo repository by sourcebook.

QUICK_REF:
Testing: Go testing. Test utilities in: resources/testhelpers_test.go.

WHAT_MATTERS

  • Generated files detected — editing them directly will break builds

  • Circular import chains detected — avoid adding to these cycles

KEY_FINDINGS

Module path: github.com/gohugoio/hugo. Use this as the import prefix for all internal packages.

HIGH

internal/ packages cannot be imported by external modules. Keep private code here.

HIGH

Feature-based architecture. Group new code by feature, not by type (don't put components in a global components/ folder).

HIGH

Tests use Go testing. Test utilities in: resources/testhelpers_test.go.

HIGH
49 test files

Circular import chains detected: livereload.js. Avoid adding to these cycles.

HIGH
+ 1 MORE FINDINGS (MEDIUM CONFIDENCE)

Project uses interface-first design (20 interfaces). Define interfaces at the consumer, not the producer.

MED
GENERATED IN ~3 SECONDS WITH

npx sourcebook init

VIEW ON GITHUB star

FROM_THE_BLOG

RELATED_REPOS

GIN