Overview

What Hugolify Admin does, and how

Prerelease

This documentation covers hugolify-admin v2, which runs with hugolify-theme v2. It stays in prerelease until Sveltia CMS reaches release 1.0 and Pages CMS reaches release 3.0: report anything you hit on the issue tracker .

Still on v1? Its documentation lives on the v1 site .

What it does

A Git-based headless CMS reads a configuration file describing every collection and every field it edits. Hugolify Admin writes that file for you, at build time, from the modules your project imports:

The same project runs any supported CMS: switching from one to another means changing one param.

How it works

The module adds an /admin/ page to the site, which loads the CMS, and writes its configuration to /admin/config.yml with the rest of the build. The configuration therefore always matches the modules and the params of the site it ships with.

Pages CMS, CloudCannon and TinaCMS read their configuration from the repository instead: a script copies the generated file there, see their pages under CMS.

Under the hood, collections, blocks and fields are Hugo partials. A field calls a widget, one per field type, and the widget writes the syntax of the CMS in use.

Customize it

Most changes happen in /config/_default/params.yaml, under admin:

To changeSee
The CMS, the Git backend, the media folders, the languagesSetup
Which collections show, in which order, with which optionsCollections
Which blocks an editor can add, and their fieldsBlocks
The fields of an object, the options of a select, the markdown editorFields
Which shortcodes the markdown editor offersShortcodes

When params are not enough, override a partial of the module, or add your own, in /layouts/_partials/admin/: a block, a field, a collection, a shortcode.

Supported CMS

CMSStatusConfiguration
Sveltia CMSPreferred/admin/config.yml, generated
Decap CMSMaintained/admin/config.yml, generated
Pages CMSMaintained.pages.yml, copied by a script
CloudCannonBetacloudcannon.config.yml, copied by a script
TinaCMSBetatina/config.js, copied from the build
Netlify CMSArchived/admin/config.yml, generated
Static CMSArchived/admin/config.yml, generated
Set up Hugolify Admin

Coming from v1

v2 groups the appearance of a block under a ui object, moves the menus to a collection of their own, and gives every collection option one name for every CMS. Front matter written by v2 is read by hugolify-theme v2 only.

See what v2 changes Migrate from v1