项目作者: matipan

项目描述 :
OpenFaaS template your hugo static sites
高级语言: Dockerfile
项目地址: git://github.com/matipan/openfaas-hugo-template.git
创建时间: 2019-04-09T23:06:32Z
项目社区:https://github.com/matipan/openfaas-hugo-template

开源协议:

下载


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:

  1. git init
  2. faas template pull https://github.com/matipan/openfaas-hugo-template
  3. 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:

  1. hugo new site .
  2. git submodule add https://github.com/budparr/gohugo-theme-ananke.git themes/ananke
  3. 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!).