Running the Neurodesk Site Locally (Hugo + Docsy)
How to edit the documentation on the Neurodesk website
1. Prerequisites
- Git
- Go (required for Hugo modules)
- Hugo extended version (0.121 recommended). See https://github.com/gohugoio/hugo/releases for Hugo releases.
2. Cloning the repository
This step is the same for macOS, Windows, and Linux.
Using SSH
git clone --recurse-submodules git@github.com:NeuroDesk/neurodesk.github.io.git
or
Using HTTPS
git clone --recurse-submodules https://github.com/NeuroDesk/neurodesk.github.io.git
If you cloned without –recurse-submodules
Run the following command to pull submodules
git submodule update --init --recursive --remote
3. Start local hugo server
On Windows:
- Extract the hugo.exe binary from the ZIP file into the root of your neurodesk.github.io directory.
- Open PowerShell or Git Bash, then run:
.\hugo.exe server --disableFastRender
- Once started, your dev website will be accessible via http://localhost:1313
On Mac:
- Extract, move, and authorize the Hugo binary:
cd ~/Downloads #edit according to location of file
tar -xvzf hugo_extended_0.115.4_darwin-universal.tar.gz #unzip the file
chmod +x hugo #Make the hugo file executable
sudo mv hugo /usr/local/bin/hugo-extended #move file to bin folder
- Verify your Hugo installation
hugo-extended version #if it is your first time running this on a Mac, you will see a security warning
Authorize the binary if macOS blocks it:
Go to System Settings > Privacy & Security, and allow the app to run.
You should expect something like this (look for the mention of extended to be sure it worked)
hugo v0.121.0-e321c3502aa8e80a7a7c951359339a985f082757+extended darwin/arm64 BuildDate=2023-12-05T15:22:31Z VendorInfo=gohugoio
Once installed, you can run the server for Mac using:
hugo-extended server --disableFastRender
Once started, your dev website will be accessible via http://localhost:1313
4. Update docsy theme submodule (optional)
git submodule update --remote
git add themes/
git commit -m "Updating theme submodule"
git push origin main