DITO dito.techDevelop In The Open

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

The manager is disabled by default. Access is the ui capability, granted through a group on the Groups page (the seeded lazysite-admins group carries it). Bootstrap in one command:

perl tools/lazysite-users.pl --docroot /path/to/public_html setup-manager

or add a user to the admin group:

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

(Capabilities on groups are the mechanism of record; the legacy manager_groups: conf key is retired and migrates itself away on upgrade.)

Accessing the manager

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

Pages

Site settings

/manager/ (or /manager/config) - the Site settings item. Edit site identity 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. Leaving with unsaved changes prompts a browser warning first; cancelling the warning keeps your edit lock, confirming releases it.

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

Saves back to lazysite/nav.conf as YAML. Changes apply only on Save: an "Unsaved changes" note appears next to the Save button as soon as you modify anything, and the browser warns before you leave the page with unsaved changes.

Plugin Manager and Plugin Config

Plugins are split across two pages: Plugin Manager (/manager/plugins) enables and disables them, and Plugin Config (/manager/plugin-config) configures the enabled ones.

On Plugin Config, 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. An action can also come back asking for a decision - the Remote sync plugin's Pull does this when the same page changed both here and on the remote copy: the pages are listed and you choose Keep mine or Take theirs (a safety snapshot is taken first either way).

The Content history plugin (content-history) turns on per-file version history for the site content: Enable content history takes an initial snapshot of the current site, then every save (manager, WebDAV, or AI connector) becomes a recorded version, browsable per file on the Files page (History / Diff / Restore). Status reports whether it is enabled, how many versions are recorded, and whether the host has the git package it needs. The history covers the content plus lazysite.conf / nav.conf and never includes secrets or personal data (accounts, form submissions, logs), so it is safe to sync to a private remote; full-system backups (see Backups) remain the disaster-recovery mechanism for exactly what the history excludes.

The Remote sync plugin (git-sync) keeps a copy of the site content on a remote server. It needs the Content history plugin to be enabled; configure the remote address, branch and access token here, then use Test connection, Push - send changes and Pull - fetch changes. Push never overwrites changes on the remote that you don't have - Pull them first.

Appearance

/manager/appearance (formerly "Themes"; /manager/themes redirects here). Manage layouts and themes and switch the active pair.

The same per-layout operations are available to partners over the control API and the MCP connector (layout-install / layout-delete / layouts-manifest; install_layout(update:true) redeploys a changed layout).

Users

/manager/users. User accounts (the same data files as tools/lazysite-users.pl):

Groups

/manager/groups (under Access in the menu). View, create, and delete groups, and tick membership per group. A group is defined by its membership, so creating one needs a first member. (Per-user assignment is also available on the Users page.)

Sessions

/manager/sessions (under Access; needs the Users & groups permission). Lists the live sessions - user, signed in, IP address, device, with a marker on your own current session - and lets you:

Sessions are still signed cookies, not server-side records: the list is an advisory registry written at login (self-pruned after 24 hours), and revocations are enforced at cookie verification. Sessions from before this feature cannot be listed, but per-user sign-out and secret rotation still kill them. Revocations are recorded in the audit trail.

Backups

/manager/backups. Typed snapshot sections - Content backups (create, download, in-app restore with an automatic pre-restore safety snapshot) and Full-system backups (download only; restored by a system user with install.pl --restore-full, since they carry the auth secrets). Backups are the disaster-recovery mechanism, including config and secrets; day-to-day content versioning lives in the Content history plugin (Plugin Manager / Plugin Config). Theme and layout snapshots are managed on the Appearance page.

Cache

/manager/cache. Cache inspection and invalidation:

Audit

/manager/audit. The material-action trail (logins, edits, deletes, config/theme changes, denied attempts) with who/what/when/where and the outcome. Filter by user, target, or a From/To date range; each row records the action's target (the page, the plugin, nav, etc.). Operations run on the shell with the users tool (setup-manager, account and credential changes) appear here too, with origin cli and the invoking system user; installs and upgrades appear with origin install. Browsing analytics live separately in Visitor statistics, not here. Viewing the audit trail requires the Audit trail permission - its own capability, separate from Analytics - granted through a group on the Groups page; it is read through an append-only cache, so only newly-appended lines are parsed on each load.

Visitor statistics

/manager/stats. A read-only dashboard from lazysite's own first-party access log: the site records its traffic itself (always anonymised at write - a daily-salted visitor key, never the IP), so statistics work out of the box with no web-server setup. The web-server access log is the fallback source when no first-party data exists. Because lazysite uses no cookies or JS, it classifies traffic by log-only heuristics into real people, the logged-in operator, AI assistants, bots and probe noise (each reported separately), splits referrers into external / internal / direct, links top pages to the live page, and shows per-day counts over a configurable window. If a server error log is readable (auto-detected), it also shows a synthesised summary of recent server errors (categories and counts only - never raw lines, addresses or paths). It never exposes any log file's path, and the raw logs are not downloadable through the manager. Provided by the opt-in Visitor Statistics plugin: the nav item appears only when the plugin is enabled - enable it on Plugin Manager (recording and retention are tunable on Plugin Config). An AI connector granted the Analytics permission can analyse the same data for trends via the analyse_visitors tool, getting only the aggregated, IP-anonymised figures (see AI connector tools and AI briefing - visitor analytics).

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 with manager access (the ui capability). The bar shows:

The admin bar sits in normal page flow at the top (it scrolls with the page, so it never overlaps a theme's own sticky header). 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 access enforcement

Access to /manager and all sub-pages is restricted to authenticated users whose groups carry the ui capability. 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.