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

README.md

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.

Usage

Create the hugo function:

git init
faas template pull https://github.com/matipan/openfaas-hugo-template
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 https://github.com/budparr/gohugo-theme-ananke.git 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.