---
name: weblog-from-webdav
description: Build, deploy, update, or troubleshoot a Virtuoso Server Pages weblog generated from a Virtuoso WebDAV collection of HTML or Markdown documents. Use for VSP weblog engine setup checks, SQL bootstrap via Virtuoso isql or isql over TLS/WebID, VSP weblog templates, RSS/Atom feed discovery, AtomPub links, scoped full-text search, calendar date filtering, schema:category facets, category metadata application, and post publication via WebDAV copying of HTML, Markdown, and asset folders including mTLS and On-Behalf-Of delegation.
---
# Weblog From WebDAV
Use this skill to turn a Virtuoso WebDAV folder into a live weblog whose posts remain ordinary files. The skill always starts by determining whether the Virtuoso-side weblog engine is already in place. If it is not, bootstrap it with `isql`; WebDAV is then used for the post-publication workflow.
## Blocking Gate — WebDAV URL Means VSP/isql Weblog
When the user asks to generate a weblog from a WebDAV URL, a static HTML index is **not** a valid completion unless the user explicitly asks for a static-only page or preview. The default deliverable is either:
- a live verified VSP weblog deployed on the target Virtuoso/WebDAV server, or
- a complete deployable VSP/isql bundle: `index.vsp`, `deploy-*.sql`, optional route SQL, optional facet/category SQL when requested, README/run notes outside the skill package, and verification queries.
Before writing or claiming completion, read `references/webdav-weblog-engine-gate.md` and run `scripts/validate_generated_weblog_bundle.py` against the generated bundle. If deployment credentials are unavailable, stop at the deployable bundle and state that live deployment is blocked by missing authenticated `isql`/WebDAV access. Do not substitute a static HTML lens as the answer.
The skill supports two interaction modalities, each with plain credential and TLS/WebID variants:
- **isql engine mode**: inspect or create the server-side weblog engine: VSP resource deployment, DAV path mapping assumptions, route/friendly URL setup, SQL helpers, full-text/search support, feed handling, metadata access, ACL/cache maintenance, and category staging. If the SQL listener is TLS-enabled, use `isql` with `-X` for the client PKCS#12 bundle, `-T` for the CA bundle, and `-W` for delegated WebID identity.
- **WebDAV post mode**: publish posts and assets only, by copying HTML files, Markdown files, and associated asset folders into the configured DAV collection. WebDAV can also read or set custom resource properties when the engine already supports them. If acting as a software agent for a principal, pass the principal WebID via the `On-Behalf-Of` HTTP header.
- **OPAL tool mode**: expose server-side weblog operations, such as post pinning, as Virtuoso stored procedures registered with `OAI.DBA.REGISTER_CHAT_FUNCTION`. Registered functions are available to OPAL/MCP-capable agents and are described through `/chat/functions/openapi.yaml`.
## First decisions
Establish these before editing or deploying:
- Target DAV collection, for example `/DAV/www2.openlinksw.com/data/html/`.
- Public route, for example `https://www.openlinksw.com/weblog/`.
- Deployment mode: `isql-engine`, `webdav-posts`, or `hybrid` where SQL bootstraps the engine and WebDAV publishes posts.
- Identity mode: SQL username/password, WebID-TLS client certificate, WebID-TLS plus delegation, WebDAV username/password, WebDAV mTLS, or WebDAV mTLS plus `On-Behalf-Of`.
- Variant: base weblog, OpenLink-site themed, facet-enabled, or the general-purpose, parameterized `templates/deploy-weblog-skinned.sql` (any DAV collection/route, not fixed to one site).
- Whether search, calendar date filtering, RSS/Atom/AtomPub links, `schema:category` facets, and scheduled category refresh are required.
- Look-and-feel is itself a configuration modality when using `deploy-weblog-skinned.sql`: `weblog:skin` (`classic` default, or `editorial`) resolves at request time from a `?skin=` override, then a `weblog:skin` collection property, then the deploy-time default — no redeploy needed to switch. See `references/skin-authoring-contract.md`.
- Whether the newsletter feature (double opt-in subscribe, batched digest via the operator's own SMTP relay) is wanted: `weblog:newsletterEnabled` plus `templates/register-weblog-newsletter.sql`.
- Every outbound newsletter message (confirm, admin-import activation notice, admin-unsubscribe notice, and both digest sends) carries `Message-ID`, `List-Id`, `Precedence: bulk`, and — when a per-recipient unsubscribe link exists — `List-Unsubscribe` / `List-Unsubscribe-Post` (RFC 8058 one-click), built by `WEBLOG_NEWSLETTER_BULK_HEADERS`. These headers reduce spam-tagging risk but are not sufficient on their own: actual inbox placement is dominated by **SPF/DKIM/DMARC alignment on the sending domain and the SMTP relay** (`weblog:newsletterSmtpServer` / the server's default mail server), which this skill has no way to configure from VSP/SQL — that is the operator's mail infrastructure to set up.
- **Email layout**: every newsletter message is `multipart/alternative` (plain text + HTML, each part base64-encoded so no line exceeds SMTP's 998-byte limit), with a `Subject` RFC 2047-encoded when it contains non-ASCII. The HTML follows the Substack pattern and is built for mail clients, not browsers: a 600px `table-layout:fixed` container, inline styles throughout (so a post's own stylesheet in full-content mode can't restyle it), a hidden preview line, a masthead linked to the weblog -- the one place the weblog's name appears in the body (the welcome heading is just "Welcome", the footer says "this weblog", and digest bylines omit it; the plain-text part, which has no masthead, keeps the name) -- and per post a serif title, the page's `` as subtitle, a byline row (date · reading time · Read online), the body, and a table-based "Read the full post" button. Confirm / activation / unsubscribe notices render their admin-editable plain-text templates as paragraphs with a button for the primary link. The footer carries Unsubscribe, "Visit the weblog", and — when `weblog:newsletterPostalAddress` is set on the collection — the sender's postal address (required for commercial mail under CAN-SPAM). A post body cut at the digest's length limit is passed through `WEBLOG_NEWSLETTER_CLOSE_OPEN_TAGS`, because an element left open by the cut (e.g. a `display:none` container) otherwise hides every later post and the footer. Gmail clips messages over ~102 KB, which several full-content infographic posts in one digest will exceed; `weblog:newsletterContentMode` `auto`/`snippet` keeps digests small. **Logo**: every email (confirm, welcome, unsubscribe notice, digest, immediate) shows a logo above the masthead, linked to the weblog, 160px wide, alt text = the sender name. `weblog:emailLogoUrl` (Email Server Config > Logo image URL): blank = OpenLink's logo `https://www.openlinksw.com/images/oplogo_std_200x80.png` (200x80 PNG, transparent background -- the raster logo openlinksw.com publishes as its `depiction`; its header logo is SVG, which Gmail and Outlook do not render in email), `none` = no logo, otherwise an http(s) image URL (PNG/JPEG/GIF). Verified locally 2026-09-28 for the default, a custom URL, `none`, an invalid value being rejected, and the digest.
- `weblog:adminEmail` (settable from the Email Server Config panel) is the site operator's own contact address, distinct from `weblog:newsletterFromAddress` (the subscriber-facing sender identity): it is used as `Reply-To` on every outbound newsletter message, and as the destination for operational alerts (a new confirmed subscriber, a digest batch with failed sends) via `WEBLOG_NEWSLETTER_NOTIFY_ADMIN`. Leaving it blank disables both, matching this skill's soft-fail-on-missing-config convention.
- **Admin action security**: `index.vsp`'s `admin_action` dispatcher (used by every dashboard form — skin/newsletter config, digest send, import, pinning, etc.) is gated by real HTTP Digest authentication, not a shared-secret token. Because `index.vsp` itself must stay world-executable to serve the public blog, `deploy-weblog-skinned.sql` maps a *second* VHOST — `action_route` (derived as `{public route}-action/`, e.g. `/weblog-admin-action/`) — at the same physical `index.vsp`, protected declaratively via `VHOST_DEFINE`'s `auth_fn=>'DB.DBA.WEBLOG_ADMIN_AUTH_FN'`/`sec=>'digest'`/`realm=>...`. `WEBLOG_ADMIN_AUTH_FN` wraps Virtuoso's native `DB.DBA.HP_AUTH_SQL_USER` builtin (real Digest verification against `SQL_USERS`) and additionally checks the authenticated username against the collection's `weblog:adminDavUser` property, so only that collection's configured admin — not just any valid SQL account — passes. The dispatcher itself also rejects any `admin_action` request that didn't arrive via `action_route` (checked against `http_request_header()[0]`), so the same code reachable through the public route can't be used to bypass the gate. `dba` is always accepted, the same way it bypasses ordinary DAV/SQL grants everywhere else; members of the `WEBLOG_OPERATOR` role are also accepted. Any account authorized this way must have `U_SQL_ENABLE=1` — `WEBLOG_ADMIN_AUTH_FN` authenticates through `DB.DBA.HP_AUTH_SQL_USER`, which refuses an SQL-disabled account outright, even with the correct password (a DAV-only account like the built-in `dav` user, or a content account that was deliberately SQL-disabled, fails here even though it can read the Digest-protected admin dashboard — that check goes through ordinary DAV authentication, a separate mechanism with no such requirement). Every setting the dashboard saves (`weblog:skin`, `weblog:adminEmail`, `weblog:newsletterConfirmBaseUrl`, digest/content mode, per-post `schema:category`/`schema:position`, the default-pin seed at deploy time) is written with `DB.DBA.DAV_PROP_SET_INT`, never with `DAV_PROP_SET (..., dav_user, pwd_magic_calc(...), ...)` — the VSP always runs as the route's own `vsp_user` regardless of who authenticated at the HTTP layer, so a write keyed to that account's own SQL password hash silently does nothing whenever that hash doesn't resolve (confirmed live: `dba` authenticating successfully on the action route still could not make a setting stick, because the VSP was still executing, and still writing, as a different `vsp_user`). `DAV_PROP_SET_INT` needs no account credential at all, so it is unaffected by any account's `U_SQL_ENABLE` state.
- **`RES_PERMS` can silently reset on upload (blocking correctness requirement)**: confirmed live on a real instance that `DAV_RES_UPLOAD_STRSES_INT`'s perms argument did not take effect for either `index.vsp` or `dashboard.html` — `RES_OWNER`/`RES_GROUP` applied correctly, but `RES_PERMS` came back as a plain default (`rw-r--r--`, world-readable, no world-execute) instead of the requested value, on the same Virtuoso build (`08.03.3335`) that applies it correctly locally; the cause was not tracked down. For `index.vsp` this silently breaks the action route the same way the general restrictive-permissions constraint does (world falls back to read-only, so an authenticated request is served raw source instead of executed) — but here `nobody` and `dba` both still get real execution, since owner/group already have `rwx`/`r-x`. For `dashboard.html` a reset is a direct exposure of subscriber names/emails, not just a broken feature. Both uploads now re-assert `RES_OWNER`/`RES_GROUP`/`RES_PERMS` with an explicit `UPDATE WS.WS.SYS_DAV_RES` immediately after the upload call, so the deploy's own word on permissions is never left to a write whose actual effect isn't being verified. There is no `weblog:adminActionToken`/shared-secret scheme anymore; a still-present `admin_token` hidden field on dashboard forms is vestigial (always empty) and does nothing.
- **Admin dashboard location (blocking architectural rule)**: `dashboard.html` lists subscriber names and emails, so it must never live in the public blog collection — anything there inherits whatever makes that collection public (on UB, an ACL on `/DAV/demos/daas/` left the file anonymously readable despite its own `000` world bits). Ask the blog admin where the admin dashboard should live, and pass it as `WEBLOG_DAV_DEPLOY_SKINNED`'s optional 7th argument, `admin_collection`. If it is omitted, the location a previous deploy recorded in `weblog:adminCollection` is reused. Otherwise the suggested default is an aunt/uncle of the blog collection (a sibling of its parent, so it's outside the public parent's subtree too): `/DAV/demos/daas/` → `/DAV/demos-daas-admin/`. The deploy refuses a location inside the blog collection. The admin collection is owned by `dav_user` and grouped to the `WEBLOG_OPERATOR` role, with no public read (`111111000N`; `dashboard.html` is `110110000N`). The permissions are re-applied on every deploy, and any old `dashboard.html` left in the public collection is deleted. DAV owner/group arguments must be the role's numeric `U_ID`: passing the role name silently stores group `-12`. The admin route is defined once, TLS-only, with `ppath` set to the admin collection, `sec=>'SSL'`, `def_page=>'dashboard.vsp'`, and `vsp_user=>dav_user` (see **VAL sign-in** below; `dashboard.html` itself stays locked). Its `vhost` comes from the 8th argument, `admin_host`. When the deploy is driven from a prompt, take `admin_host` from the host of the blog's public URL (for example `https://linkeddata.uriburner.com/weblog/` → `linkeddata.uriburner.com`); `[URIQA] DefaultHost` is only the fallback. Its `lhost` comes from the 9th argument, `admin_listener` (e.g. `':443'`), else `[HTTPServer] SSLPort`, else an existing `:443` listener. Instances whose TLS listener is defined in Conductor (UB) have no `SSLPort` in the ini. The deploy fails before writing anything if no host or TLS listener can be resolved.
- **WebDAV permalink and Subscribe button**: the selected/viewed post (both skins) shows a "WebDAV Permalink" link — the post's raw underlying DAV URL (`site_base` + `weblog:dav_collection` + filename), not the weblog's own `?post=` query-string view — distinct and separately clickable. The feed-buttons nav gets a third "Subscribe" button (a matching `--subscribe` color token per skin) whenever `weblog:newsletterEnabled` is true. The subscribe form itself is a native `