Skip to main content
GitHub
1 min read

Plugins

PWA Plugin

Add Progressive Web App support with offline access

The PWA plugin adds Progressive Web App capabilities to your documentation site, including offline access, installability, and a web app manifest.

Installation

pnpm add @barodoc/plugin-pwa@latest

Configuration

{
  "plugins": [
    ["@barodoc/plugin-pwa", {
      "name": "My Docs",
      "shortName": "Docs",
      "themeColor": "#0070f3",
      "backgroundColor": "#ffffff",
      "display": "standalone"
    }]
  ]
}

The plugin generates:

  • manifest.json — web app manifest with name, icons, and display mode
  • sw.js — service worker for offline caching

Options

namestring

Full app name. Defaults to the site name from config

shortNamestring

Short app name for the home screen. Defaults to name

themeColorstring

Theme color for the browser chrome. Default: "#2563eb"

backgroundColorstring

Background color for the splash screen. Default: "#ffffff"

display'standalone' | 'fullscreen' | 'minimal-ui' | 'browser'

Display mode. Default: "standalone"

offlineFallbackstring

Page to show when offline and the requested page is not cached. Default: "/404"