Add Contact Form in Hugo Site

Create a lambda function to send the contact message Setup SES and verify sender email address Create an IAM role for lambda with policy details below { "Version": "2012-10-17", "Statement": [ { "Sid": "VisualEditor0", "Effect": "Allow", "Action": [ "ses:SendEmail", "logs:CreateLogStream", "logs:PutLogEvents" ], "Resource": "*" } ] } Create the lambda function const aws = require("aws-sdk"); const ses = new aws.SES({ region: "ap-southeast-2" }); exports.handler = async function (event) { console.

Enable Raw Html in Hugo

Enable support of raw html Hugo disables html element rendering by default, we need to enable it. Enable for an entire site Add below in the config file [markup.goldmark.renderer] unsafe= true Enable for a single page Create layout/shortcodes/unsafe.html with the following content: {{ .Inner }} In the markdown page, use it like this, {{< unsafe >}} <ul> <li>First item</li> <li>Second item <li>Third item</li> </ul> {{< /unsafe >}} above will be rendered like this, First item Second item Third item Reference How To Escape Shortcode In Hugo Template Configure Markup Create Your Own Shortcodes Enable unsafe=true for a single page

How to Create Site With Hugo

Install hugo on Centos7 Add epel repo The Hugo package can be found at, take the correct version, and place it in /etc/yum.repos.d/hugo.repo vim /etc/yum.repos.d/hugo.repo # add content below the file [] name=Copr repo for hugo owned by daftaupe baseurl=$basearch/ type=rpm-md skip_if_unavailable=True gpgcheck=1 gpgkey= repo_gpgcheck=0 enabled=1 enabled_metadata=1 Install yum -y install hugo hugo version Quick start # Create a new site hugo new site mysite # Add a Theme cd mysite git init git submodule add https://github.