1.0.6 • Published 1 year ago

vitepress-protect-plugin v1.0.6

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

🛡️ VitePress Protect Plugin

A VitePress plugin to protect your content from copying and inspection.

🌟 Features

  • 🚫 Disable F12 key (optional)
  • 📋 Prevent copying (optional)
  • 🖱️ Disable text selection (optional)

📦 Installation

npm install vitepress-protect-plugin

or if you're using yarn:

yarn add vitepress-protect-plugin

or if you're using pnpm:

pnpm add vitepress-protect-plugin

🚀 Usage

In your VitePress config file (usually .vitepress/config.js or .vitepress/config.ts):

import { defineConfig } from "vitepress"
import vitepressProtectPlugin from "vitepress-protect-plugin"

export default defineConfig({
  // other VitePress configs...
  vite: {
    plugins: [
      vitepressProtectPlugin({
        disableF12: true,
        disableCopy: true,
        disableSelect: true,
      }),
    ],
  },
})

⚙️ Options

OptionTypeDefaultDescription
disableF12booleantrueDisable F12 key to prevent opening developer tools
disableCopybooleantruePrevent copying content
disableSelectbooleantrueDisable text selection

🤝 Contributing

Contributions, issues and feature requests are welcome! Feel free to check issues page.

  1. Fork the project
  2. Create your feature branch (git checkout -b feature/amazingFeature)
  3. Commit your changes (git commit -m 'Add some amazingFeature')
  4. Push to the branch (git push origin feature/amazingFeature)
  5. Open a Pull Request

📝 License

This project is MIT licensed.

🙏 Acknowledgements

  • VitePress for the amazing static site generator
  • All contributors who help improve this plugin

Made with ❤️ by Cellinlab

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago