Available in production Maintained CMS
Warning: Not supported features
- Cloud assets
- i18n structure
- Map Widget
- Parent field of nested pages
Enable Pages CMS
/config/_default/params.yaml
admin:
cms: pagescms
Build config file
Build a .pages.yml file with Hugo and NodeJS script. This file needs to be versioned.
yarn build:config:pagescms
The script builds the site and copies /public/admin/config.yml to .pages.yml. It ships with the
GitHub template
. Elsewhere, copy the scripts folder of
hugolify-admin
to your project and add the command to package.json:
"scripts": {
"build:config:pagescms": "node scripts/build-config-pagescms.js"
}
Enable/disable media
Pages CMS keeps the files in media libraries, one per folder. The image library is always there: turn on one more per type of file the site uses, as its fields upload there.
/config/_default/params.yaml
admin:
media:
audio_folders: true
document_folders: true # the PDF files
video_folders: true
Settings page
Hugolify hides the Pages CMS settings page, so editors cannot change .pages.yml from the interface. Show it again with:
/config/_default/params.yaml
admin:
settings:
hide: false
Entry list
New in v2Hugolify builds the view of each collection from the options the other CMS read too. There is no view param any more.
| Option | view key |
|---|---|
summary_fields | fields, with summary written title |
sortable_fields | sort, and default for the field sorting by default |
nested of 2 and up | layout: tree, each _index.md standing for its folder |
admin:
collections:
posts:
summary_fields: [title, date, draft]
sortable_fields:
- field: date
default_sort: desc
- title
Exclude files
Pages CMS cannot filter entries on a field value, as filter does elsewhere. Leave files out of a collection by name instead:
/config/_default/params.yaml
admin:
collections:
posts:
exclude: [_index.md]
The name is compared at every level of the folder: in a nested collection, whose pages are all _index.md files, excluding it would hide every page.
Raw markdown
The rich-text editor has its own Editor / Source switch, so the minimal, modes and buttons params of the markdown fields do not apply. See Markdown editor.