Skip to content
OpenFaaS template your hugo static sites
Branch: master
Clone or download
Latest commit acfa694 Aug 17, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
template/hugo Use the official watchdog Aug 17, 2019 Upload documentation Aug 3, 2019

OpenFaaS template for Hugo

This template allows you to deploy hugo sites using OpenFaaS. It simply copies over the contents of your hugo site, builds it into the public directory and then uses a very lightweight static server that serves the content and provides a healtcheck that follows the standards from OpenFaaS.


Create the hugo function:

git init
faas template pull
faas new --lang hugo -g <openfaas gateway url> --prefix <docker hub username> example-site

This will create a folder called example-site, cd into it and now create the site with this instructions from the hugo quickstart guide:

hugo new site .
git submodule add themes/ananke
echo 'theme = "ananke"' >> config.toml

At this point you can run hugo server in that directory to build and test your site locally without needing to deploy it to OpenFaaS. Remember to update the baseURL found in the config.toml to the domain that you will be using.

Custom domains with TLS on OpenFaaS

Follow this tutorial to learn how to continuosly deploy your sites and have a custom domain name pointing at them (with TLS!).

You can’t perform that action at this time.