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 modesw.js— service worker for offline caching
Options
namestringFull app name. Defaults to the site name from config
shortNamestringShort app name for the home screen. Defaults to name
themeColorstringTheme color for the browser chrome. Default: "#2563eb"
backgroundColorstringBackground color for the splash screen. Default: "#ffffff"
display'standalone' | 'fullscreen' | 'minimal-ui' | 'browser'Display mode. Default: "standalone"
offlineFallbackstringPage to show when offline and the requested page is not cached. Default: "/404"