community.dhcf.eu Sign in

Manager

Web-based admin and content manager for lazysite.

Overview

The lazysite manager is a web-based admin UI built into lazysite itself. It lets you configure the site, manage users, install themes, enable plugins, edit pages, and clear the cache - all from the browser.

Manager pages are ordinary lazysite .md pages served through the normal pipeline, using a dedicated manager theme for consistent chrome.

Enabling the manager

Add to lazysite/lazysite.conf:

manager: enabled
manager_path: /manager
manager_groups: lazysite-admins

The manager is disabled by default. manager_groups restricts access to members of the listed group(s). Multiple groups can be comma-separated.

At least one user must be in manager_groups. Create one with:

perl tools/lazysite-users.pl --docroot /path/to/public_html \
  group-add alice lazysite-admins

Accessing the manager

Navigate to /manager (or the configured manager_path). You must be authenticated and in a configured manager_groups group. Unauthenticated visitors are redirected to /login.

Pages

Config

/manager/ (or /manager/config). Edit site settings and review the plugin registry.

Files

/manager/files. File browser for the docroot. You can:

The editor at /manager/edit shows:

Locks expire after 5 minutes and are renewed automatically while the editor is open.

/manager/nav. Visual editor for lazysite/nav.conf:

Saves back to lazysite/nav.conf as YAML.

Plugins

/manager/plugins. Per-plugin configuration UI.

Each enabled plugin appears with a form generated from its config_schema. Save writes the plugin's config file (e.g. lazysite/forms/smtp.conf for the SMTP plugin).

Plugins that declare actions (e.g. Run audit) show action buttons that invoke the plugin and display the result.

Themes

/manager/themes. Install, activate, rename, and delete themes.

Uploading a theme that would overwrite an existing directory prefixes the install path with today's date (e.g. 20260419-mytheme).

Users

/manager/users. User and group management using the same data files as tools/lazysite-users.pl:

Cache

/manager/cache. Cache inspection and invalidation:

Admin bar on site pages

When the manager is enabled, the processor injects an admin bar on site pages (non-manager pages) for authenticated users in manager_groups. The bar shows:

The admin bar is a compact fixed-position bar at the top of the page. Unauthenticated visitors and non-manager users do not see it.

Installation

The installer copies lazysite-manager-api.pl to cgi-bin/ alongside lazysite-processor.pl. The manager pages in starter/manager/ are served as regular lazysite pages; the manager's internal template in starter/lazysite/manager/ (D013: outside both layouts/ and themes/) supplies its chrome.

For manual installation:

cp lazysite-manager-api.pl /path/to/cgi-bin/
chmod 755 /path/to/cgi-bin/lazysite-manager-api.pl
cp -r starter/manager /path/to/public_html/manager
cp -r starter/lazysite/manager /path/to/public_html/lazysite/

Security

Manager group enforcement

Access to /manager and all sub-pages is restricted to authenticated users in the configured manager_groups. Unauthenticated users are redirected to /login.

Blocked paths

The manager API blocks read and write access to sensitive files:

User and group management is handled through the dedicated Users page, not through direct file editing.

Path validation

All file operations validate paths with realpath() to ensure they resolve within the document root. Path traversal attempts are rejected.