{{.Include "/includes/docs-head.html"}}

hugo
Addon

Addon
This directive is a Caddy extension. Questions should be directed to its maintainer. github.com/hacdias/caddy-hugo

hugo allows you to deploy and manage a static site with an web-based admin interface where you can edit content, schedule posts, upload files, etc. The admin interface will be available at /admin on your website. It is built to be used with Hugo - which is bundled with the plugin so you don't have to install it separately.

Requirements: this add-on does not create a new Hugo site for you; you'll need to run hugo new site if you don't already have a Hugo site.

Syntax

root public hugo dir { styles file args cmd }

All of the directives above are optional.

To schedule a post, its date field must be in '2006-01-02 15:04:05-07:00' format.

This directive should be used with root, basicauth and errors middleware to have the best experience. See the examples to know more.

Examples

A simple configuration to use with Hugo static website generator:

localhost:8080 # website URL and port root public # the folder where Hugo generates the website basicauth /admin user pass # protect the admin area using HTTP basic auth hugo # enable the admin panel
{{.Include "/includes/docs-nav.html"}}