Skip to content

voorhoede/nuxt-preview-mode-module

Repository files navigation

@voorhoede/nuxt-preview-mode-module

npm version npm downloads Github Actions CI License

Extends Nuxt's built-in preview mode.
This module only works with Nuxt 2 since at the time of writing this Nuxt 3 does not have a preview mode.

Features

  • 🚪 Enables preview mode through routing (?preview=true)
  • 🔒 Secures preview mode with a (client-side) secret (&previewSecret=...)
  • 🧠 Persists preview mode through routing & page refresh using storage
  • 🎛️ Provides programmatic way to enter() and exit() preview mode
  • 🍫 Provides component to display and control preview mode

Maintenance

This module is developed by De Voorhoede. We will continue to maintain this module as long as we use this in our projects. Feel free to use and fork this module. We will only handle issues or accept pull requests if they aid our projects.

Development

  1. Clone this repository
  2. Install dependencies using yarn install or npm install
  3. Start development server using npm run dev

License

MIT License

Copyright (c) Voorhoede