@voorhoede/nuxt-preview-mode-module

Module enabling persistent preview mode for nuxt

Usage no npm install needed!

<script type="module">
  import voorhoedeNuxtPreviewModeModule from 'https://cdn.skypack.dev/@voorhoede/nuxt-preview-mode-module';
</script>

README

@voorhoede/nuxt-preview-mode-module

npm version npm downloads Github Actions CI License

Extends Nuxt's built-in 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