Encryption

Absolute Press provides an article-level password gate: pages hit by a rule get their content wrapped in the PasswordGate island, and the content shows only after the correct password is entered.

Configuration

ts
encrypt: [
  {
    match: '/guide/secret', // exact string match on the route, or RegExp.test
    passwords: ['docs-demo'],
    hint: 'optional hint text',
  },
];

Mechanics

Boundaries (important)

This is a client-side password gate, not real encryption: the content ships in full with the HTML and is merely hidden by CSS, so a technical reader can read it straight from the page source. It fits "keep out casual visitors" scenarios, not genuinely confidential content — a deliberate design tradeoff. If you need real encryption, split the content out before building.

Also: pages hit by a rule leave the sitemap automatically, and string rules append their match path as a robots.txt Disallow (RegExp rules cannot be expressed as robots patterns and stay unlisted). Give protected pages frontmatter feed: false to leave RSS too, so titles and links do not leak into the feed.

Demo

This site has a real rule configured: the encryption demo page is hit by match: '/en/guide/secret', and the demo password is the docs-demo in the config above; match also accepts a RegExp form — see the site's vite.config.ts for the syntax.

For the password gate's island activation and implementation details, see islands runtime.