hugo Addon
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
}
- public is the folder with the public content.
- dir is the folder where the commands are going to be executed. By default, it is the current working directory.
- file is the relative path to
public
folder of the admin UI styles. These styles won't replace the defaults, they will be added. - cmd must be surrounded by double quotes and it corresponds to the Hugo flags you want to use.
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