How the heck do I put content on What is hugo?! Can someone hold me while I cry?!

Hugo is the tool we use to build All hugo does is take some static files, compiles them with our template, then output a bunch of html files.

Please follow the installation guide located here. After you install it, please read up more about hugo.

We use git for version control, so you're going to need git.

You can use GitHub Desktop, or if you're feeling adventurous git-bash.

The website is located here. Clone it (which means “download”) to your local computer. As a note, now's a good time to ensure you have a GitHub account, and are added to the UBNetDef GitHub account.

Netdef Repo:

Lockdown Repo:

Git Command:

git clone "REPO"

After cloning for the first time, there is no need to reclone the repo. To update your copy of the website to the most current version use the command git pull from a git CLI in the directory you previously created.

You're going to need a terminal open. Run hugo server inside the UBNetDef website directory you just cloned. Visit the URL it shows, and you should see all the changes you did show up automatically. Once your changes are completed, commit, then push them.

Once you push them to the GitHub repo, the website will auto-magically download the changes, and build it. Woah! It's magic.

Git commands:

git add -A

git committ -m "Change comments"

git push


  • Anything inside the static/ directory automatically gets copied into the's website root.
    • Example: If I have a file called test.txt inside the static/ directory, you will be able to access it via
  • The content/ directory contains, well, the page content. It is rendered in markdown.
  • A webhook is setup on the GitHub repo, that will ping a url once a commit is pushed
  • We run this webhook software that will listen for the “ping” from GitHub, and run a bash script.
  • You can see the scripts located in the web-builder user on the webserver. The relevant script is located below.
#!/usr/bin/env bash
cd ~/repos/$WEBSITE
git fetch origin > /dev/null
git reset --hard origin/master > /dev/null
echo "Building $WEBSITE..."
echo "-----"
echo "-----"
# Update the the files
rsync -crlpgoDi --delete public/* /web/$WEBSITE/public | while read unused filename; do
  echo "Updated $filename"
# Fix the group
chgrp -hRf web-admins /web/$WEBSITE/public
# Make all files group writable
find /web/$WEBSITE/public -type f -exec chmod 664 {} \;
echo "$WEBSITE has been built and deployed!"
  • guides/editing_ubnetdef_website.txt
  • Last modified: 2017/09/18 18:18
  • by jeredgei