Running the Neurodesk Site Locally (Hugo + Docsy)

How to edit the documentation on the Neurodesk website

1. Prerequisites

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:

  1. Extract the hugo.exe binary from the ZIP file into the root of your neurodesk.github.io directory.
  2. Open PowerShell or Git Bash, then run:
.\hugo.exe server --disableFastRender
  1. Once started, your dev website will be accessible via http://localhost:1313

On Mac:

  1. 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
  1. Verify your Hugo installation
hugo-extended version #if it is your first time running this on a Mac, you will see a security warning

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