Skip to content

Add local-hugo wrapper for Imported documentation - #987

Merged
fsimonis merged 7 commits into
precice:hugofrom
MuhammadAashirAslam:local-hugo
Oct 5, 2026
Merged

fsimonis merged 7 commits into
precice:hugofrom
MuhammadAashirAslam:local-hugo

Conversation

@MuhammadAashirAslam

Copy link
Copy Markdown
Collaborator

Adds a Python wrapper (tools/local-hugo) to simplify live-editing imported modules locally, as suggested in #979 (comment).

Instead of manually setting HUGO_MODULE_REPLACEMENTS, you can point to local repository clones using simple flags:

# Live-edit tutorials
tools/local-hugo --tutorials=../tutorials server

# Live-edit multiple modules
tools/local-hugo --openfoam=../openfoam-adapter --tutorials=../tutorials server

The script resolves relative paths to absolute paths, sets HUGO_MODULE_REPLACEMENTS, and executes Hugo. All standard Hugo commands and arguments (like server, --bind 0.0.0.0, etc.) are passed straight through.

@MuhammadAashirAslam

Copy link
Copy Markdown
Collaborator Author

@MakisH should we also document this in README? i added a help command in the script itself tools/local-hugo --help .

Comment thread tools/local-hugo Resolved
Comment thread tools/local-hugo Resolved
Comment thread tools/local-hugo Resolved
@MakisH MakisH added the technical Technical issues on the website label Sep 17, 2026
Comment thread tools/local-hugo Resolved
Comment thread tools/local-hugo Resolved
Comment thread tools/local-hugo Resolved
@fsimonis fsimonis mentioned this pull request Sep 22, 2026
6 tasks done
@fsimonis

fsimonis commented Oct 5, 2026

Copy link
Copy Markdown
Member

Looking good now! Let's merge.

@fsimonis
fsimonis merged commit f8e0a85 into precice:hugo Oct 5, 2026
2 checks passed
MakisH pushed a commit that referenced this pull request Oct 20, 2026
Co-authored-by: Frédéric Simonis <simonisfrederic@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

technical Technical issues on the website

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants