The content for the public-facing website for Azure Citadel
The site is currently hosted on Azure Static Web Apps, using GitHub actions to deploy, sitting behind Azure Front Door
Example commands for Ubuntu 24.04, run from the local directory for the cloned repo.
You should only need to either
- install a precompiled binary
- compile your own from source and include it in your PATH
You will need to compile your own if installing v0.90.1 on aarch64 architecture.
-
Ensure you are in the root of the cloned repo
cd ~/git/azurecitadel
-
Install npm
sudo apt update && sudo apt install -y npm -
Install the npm modules
npm install
-
List out the installed npm modules
npm ll
Example output:
azurecitadel@ │ /home/richeney/git/azurecitadel │ ├── @primer/css@19.1.0 │ ├── @primer/octicons@16.2.0 │ └── highlight.js@11.4.0
-
Determine the Hugo version from the Dockerfile
-
Set the variable
hugo_version=0.90.1
-
Download the .deb file
hugo_binary=hugo_extended_${hugo_version}_Linux-64bit.deb wget https://github.com/gohugoio/hugo/releases/download/v$hugo_version/$hugo_binary
If there is no binary file in the Releases then you will need to compile a binary from source.
-
Install hugo
sudo apt install ./$hugo_binary -y -
Remove the .deb file
rm $hugo_binary
If you successfully completed the install steps for the precompiled binary then jump straight to Run Hugo.
Instructions taken from the Hugo readme and customised for the older extended version used on this site on Ubuntu 24.04 running in WSL2 on aarch64.
-
Build the binary using go install
CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@v${hugo_version}The resulting files will be written to ~/go/bin and the directory should be added to your path.
To ensure apt doesn't update to the most recent, mark the package.
-
Set hold
sudo apt-mark hold hugo
-
List the holds
sudo apt-mark showhold
-
Check location and version
You may need to refresh the session if the path has changed.
which hugo && hugo versionExample output:
/home/richeney/go/bin/hugo hugo v0.90.1+extended linux/arm64 BuildDate=unknown -
Run the server
hugo server
Example output:
Start building sites … hugo v0.90.1+extended linux/arm64 BuildDate=unknown | EN -------------------+------ Pages | 348 Paginator pages | 0 Non-page files | 294 Static files | 6 Processed images | 0 Aliases | 92 Sitemaps | 1 Cleaned | 0 Built in 1317 ms Watching for changes in /home/richeney/git/azurecitadel/{archetypes,content,package.json,static,themes} Watching for config changes in /home/richeney/git/azurecitadel/config/_default, /home/richeney/git/azurecitadel/config/development Environment: "development" Serving pages from memory Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender Web Server is available at http://localhost:1313/ (bind address 127.0.0.1) Press Ctrl+C to stop -
Ctrl + Click on the URL