1. Install Latest Hugo Extended (Ubuntu amd64)#

Use this script to automatically fetch and install the latest .deb package from GitHub.

#!/usr/bin/env bash

echo "Installing latest Hugo Extended..."

ARCH=$(dpkg --print-architecture)

if [ "$ARCH" != "amd64" ]; then
  echo "This script currently supports amd64 only."
  echo "Detected architecture: $ARCH"
  exit 1
fi

echo "Fetching latest version..."
LATEST=$(curl -s [https://api.github.com/repos/gohugoio/hugo/releases/latest](https://api.github.com/repos/gohugoio/hugo/releases/latest) \
  | grep '"tag_name":' \
  | sed -E 's/.*"v([^"]+)".*/\1/')

if [ -z "$LATEST" ]; then
  echo "Failed to fetch latest version."
  exit 1
fi

echo "Latest version: $LATEST"
FILE="hugo_extended_${LATEST}_linux-amd64.deb"
URL="[https://github.com/gohugoio/hugo/releases/download/v$](https://github.com/gohugoio/hugo/releases/download/v$){LATEST}/${FILE}"

echo "Downloading $FILE..."
wget -q --show-progress "$URL"

if [ ! -f "$FILE" ]; then
  echo "Download failed."
  exit 1
fi

echo "Installing package..."
sudo dpkg -i "$FILE"
sudo apt-get -f install -y

echo "Cleaning up..."
rm -f "$FILE"

echo ""
echo "Installed Hugo version:"
hugo version

echo ""
echo "Done."

2. Install Blowfish Theme#

Commands to initialize your project (e.g., canada2argentina) and install the Blowfish theme as a submodule.

2.1. Initialize Submodule#

# Navigate to your project directory
cd /home/marc/hugo/canada2argentina

# Initialize git
git init

# Add Blowfish as a git submodule
git submodule add --depth 1 [https://github.com/nunocoracao/blowfish.git](https://github.com/nunocoracao/blowfish.git) themes/blowfish

2.2. Configure Theme Files#

# Create the necessary config directory
mkdir -p config/_default

# Copy the configuration files from the theme to your project
cp themes/blowfish/config/_default/*.toml config/_default/

# Remove the default hugo.toml if it exists (using separate config files instead)
rm /home/marc/hugo/canada2argentina/hugo.toml

3. Migration & Utilities#

3.1. WordPress Export Tool#

apt install nodejs npm -y
# Then run: npx wordpress-export-to-markdown

3.2. Development Server Commands#

Use these to preview your site on your local network.

For HP Node:

hugo server --bind 0.0.0.0 --baseURL "http://10.1.2.202" --buildDrafts --disableFastRender --ignoreCache --noHTTPCache --gc -p 1313

For Mac Studio/Local:

hugo server --bind 0.0.0.0 --baseURL "http://10.1.2.4" --buildDrafts --disableFastRender --ignoreCache --noHTTPCache --gc -p 1313

Kill Running Hugo Process:

pkill -9 hugo

4. Deployment#

Link your repository to Cloudflare Pages for automatic deployment: