Skip to content
Docent Docs

Web Admin

Groups and Uploads

Manage navigation groups from the UI and upload images that inherit your docs middleware.

Two more things the panel handles: the navigation groups that organize your sidebar, and the images your pages reference.

Managing groups

Hover a group header in the page tree and a pencil appears. It opens the group's settings, where you set the same fields a _group.yml carries:

  • Label: the heading shown in the sidebar.

  • Order: where the group sorts against its siblings.

  • Icon: picked from the bundled icon set.

For a group that's backed by a _group.yml file, editing it in the UI stores an override rather than rewriting the file. Reset the group and it falls back to the _group.yml on disk, unchanged.

Image uploads

Drop an image into the editor and the panel stores it and inserts the reference for you. Uploads land on the disk configured by admin.disk in your site's entry:

php
// inside sites.docs
'admin' => [
    'disk' => 'public',
],

Any disk works: public, local, or a private S3 bucket. You don't need storage:link or a public bucket, because uploads aren't served straight off the disk. They stream back through the docs _uploads route, which means:

  • Images inherit the docs route middleware. If your docs are behind auth, so are their images.

  • There's no filesystem symlink or public-bucket setup.

  • You can keep documentation images on a private disk and still have them render for authorized readers.

That closes the loop: the same authorization that protects your pages protects the images inside them.

Each site stores its uploads under its own docent/{site}/ directory on the disk, and each site's _uploads route serves only that directory. Two sites can point at the same disk without a private site's images becoming reachable through a public site's route.

Docent accepts PNG, JPEG, GIF, WebP, and SVG uploads. It serves each file with its exact image type and prevents content sniffing. SVGs are sanitized before they are stored — scripts, event handlers, and embedded HTML never reach the disk — and are served with an additional sandbox policy, so they remain useful as images even when someone opens the raw upload URL.

Uploaded images use private, immutable browser caching by default. If every reader may share the same cached response—for example, your documentation is entirely public—you can opt into public caching:

php
// inside sites.docs
'admin' => [
    'uploads' => [
        'public_cache' => true,
    ],
],

Back to the overview, or start writing docs.