Skip to content

[CI] Migrate to npm-managed local Hugo and standardise Makefile targets#210

Open
hebypaul wants to merge 4 commits into
layer5io:masterfrom
hebypaul:feature/hebypaul/208
Open

[CI] Migrate to npm-managed local Hugo and standardise Makefile targets#210
hebypaul wants to merge 4 commits into
layer5io:masterfrom
hebypaul:feature/hebypaul/208

Conversation

@hebypaul

Copy link
Copy Markdown
Contributor

Notes for Reviewers
This PR updates the local development environment to use an npm-managed version of Hugo (extended) and standardizes the Makefile targets. This streamlines the setup process by removing the need for contributors to globally install Hugo on their local machines, ensuring version consistency between local environments and CI.

Key Changes:

  • Makefile: Added a check-deps target to validate dependencies and rerouted standard commands (site, serve, build, clean) to trigger their respective local npm scripts.
  • package.json: Added dev:* scripts (e.g., dev:build, dev:site) to explicitly handle Hugo commands using the local node module.
  • Documentation: Updated README.md and CONTRIBUTING.md to remove references to a global Hugo installation and emphasize the unified make setup -> make site workflow.

This PR fixes #208

Signed commits

  • Yes, I signed my commits.

@github-actions

github-actions Bot commented Jun 11, 2026

Copy link
Copy Markdown

🚀 Preview deployment: https://layer5io.github.io/academy-theme/pr-preview/pr-210/

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the local development workflow to use an NPM-managed local Hugo binary instead of requiring a global Hugo installation. It updates the documentation, introduces a dependency check in the Makefile, and adds helper scripts to package.json. The review feedback suggests removing the redundant dependency check from the clean target, reverting the removal of npx for npm-check-updates to handle missing optional dependencies, and simplifying a repetitive sentence in the contribution guide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread Makefile Outdated
Comment thread package.json Outdated
Comment thread CONTRIBUTING.md Outdated
@hebypaul hebypaul force-pushed the feature/hebypaul/208 branch from 69658b9 to b40088f Compare June 23, 2026 19:35
hebypaul added 3 commits June 24, 2026 10:04
Signed-off-by: Heby T Paul <hebytpaul1111@gmail.com>
Signed-off-by: Heby T Paul <hebytpaul1111@gmail.com>
Signed-off-by: Heby T Paul <hebytpaul1111@gmail.com>
@hebypaul hebypaul force-pushed the feature/hebypaul/208 branch from b40088f to d82817e Compare June 24, 2026 04:34
Signed-off-by: Heby T Paul <65991026+hebypaul@users.noreply.github.com>
@hebypaul

Copy link
Copy Markdown
Contributor Author

Hey @Bhumikagarggg @CodexRaunak , here is the full sanity check and testing breakdown requested to validate the npm-managed Hugo migration.

1. CI / Fork Merge Simulation

As an initial check, I simulated the production merge by pulling these changes into the master branch of my personal fork. This confirmed that the transition to the local Hugo binary is seamless and does not break the automated GitHub Actions CI pipelines or existing automated workflows.

2. Local Environment Execution

I ran a comprehensive test suite locally to ensure all commands route properly without a global installation.

  • Global Dependency Check: Verified hugo version returns "command not found", proving the global binary is completely bypassed.
  • Makefile Targets: Successfully executed make check-deps, make build, make clean, and make site, confirming they accurately trigger the local npm-managed Hugo.
Screenshot 2026-06-26 133338 Screenshot 2026-06-26 133800 Screenshot 2026-06-26 133817
  • NPM Scripts: Manually triggered npm run dev:build and npm run dev:site to ensure the underlying package.json scripts function perfectly on their own.

3. Edge Case Validation (Negative Cases)

To ensure a smooth experience for new contributors, I also tested the environment without prerequisites installed to verify our new check-deps script:

  • Missing Local Hugo (Fresh Clone): Temporarily removed node_modules and ran make site. The Makefile gracefully caught the error, prompting: "Error: Hugo binary not found in node_modules. Please run 'make setup' first."
Screenshot 2026-06-26 150144
  • Missing NPM/Node.js: Ran the commands with a restricted system path to simulate a machine without npm. It successfully caught the missing dependency: "Error: 'npm' not found. Please install Node.js and npm."
Screenshot 2026-06-26 150251

Let me know if you need any additional validations before merging!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI] Migrate to npm-managed local Hugo and standardise Makefile targets

1 participant