Current Behavior
Currently, the layer5io/academy-example template relies on a globally installed Hugo binary or inconsistent npx invocations for local development. Because this repository serves as the blueprint for all Layer5 academies, any new academy generated from this template automatically inherits these problematic build scripts, leading to version mismatches and CI discrepancies for new contributors.
Desired Behavior
A contained, highly reproducible local development environment where dependencies are strictly managed via npm. Running make setup should fetch the correct hugo-extended NPM dependency. Subsequent commands (make site, make build, make serve, etc.) should automatically route to this local binary, eliminating the need for a global Hugo installation.
Implementation
This approach standardizes the build process for the template, ensuring all future academy repositories are created with correct CI hygiene from day one. This matches the migrations already applied to meshery/meshery, digitalocean-academy, and exoscale-academy.
Specific changes should include:
- Makefile: Add a
check-deps target to validate npm and the local hugo binary before execution. Reroute build, site, serve, and clean to trigger their respective npm run scripts.
- package.json: Add
dev:* scripts (e.g., dev:build, dev:clean, dev:site) to explicitly handle Hugo commands with the correct flags, relying on the local node module instead of a global installation.
- Documentation: Update
README.md and CONTRIBUTING.md to remove references to installing Hugo globally, emphasizing the unified make setup -> make site workflow for newcomers.
Acceptance Tests
Contributor Guide and Resources
Contributor Guide and Resources
Current Behavior
Currently, the
layer5io/academy-exampletemplate relies on a globally installed Hugo binary or inconsistentnpxinvocations for local development. Because this repository serves as the blueprint for all Layer5 academies, any new academy generated from this template automatically inherits these problematic build scripts, leading to version mismatches and CI discrepancies for new contributors.Desired Behavior
A contained, highly reproducible local development environment where dependencies are strictly managed via
npm. Runningmake setupshould fetch the correcthugo-extendedNPM dependency. Subsequent commands (make site,make build,make serve, etc.) should automatically route to this local binary, eliminating the need for a global Hugo installation.Implementation
This approach standardizes the build process for the template, ensuring all future academy repositories are created with correct CI hygiene from day one. This matches the migrations already applied to
meshery/meshery,digitalocean-academy, andexoscale-academy.Specific changes should include:
check-depstarget to validatenpmand the localhugobinary before execution. Reroutebuild,site,serve, andcleanto trigger their respectivenpm runscripts.dev:*scripts (e.g.,dev:build,dev:clean,dev:site) to explicitly handle Hugo commands with the correct flags, relying on the local node module instead of a global installation.README.mdandCONTRIBUTING.mdto remove references to installing Hugo globally, emphasizing the unifiedmake setup->make siteworkflow for newcomers.Acceptance Tests
make setupinstalls the localhugo-extendeddependency cleanly.make sitesuccessfully spins up the local development server using the NPM-managed binary.make cleancorrectly wipes the build cache using the local binary.Contributor Guide and Resources
Contributor Guide and Resources