Get Feedback on your Docus based documentation
- 💾 SQLite based Storage
- ⛰ Handy composables
- 🗂 TypeScript Support
This module is an extension of the documentation theme Docus, this module creates an API endpoint for feedbacks, which enables the possibility to create a component like the Example and allows the user to provide feedback for the documentation articles via the composable that comes with this module.
The feedbacks are stored in an SQLite Database.
- Add
docus-feedback
dependency to your project
# Using pnpm
pnpm add -D docus-feedback
# Using yarn
yarn add --dev docus-feedback
# Using npm
npm install --save-dev docus-feedback
- Add
docus-feedback
to themodules
section ofnuxt.config.ts
export default defineNuxtConfig({
modules: ["docus-feedback"],
});
That's it! You are now able to get feedback on your documentation pages ✨
Field | Datatype |
---|---|
id | INTEGER |
feedback | TEXT |
timestamp | INTEGER |
user_id | TEXT |
Option | Description | Default |
---|---|---|
autoUserTracking |
every submitting user gets a unique id made persistent in the localstorage | true |
isEnabled |
enable and disable the module | true |
rateLimiter |
rate limit configuration | - |
rateLimiter.throwError |
wheter or not to throw erros if rate limited | false |
rateLimiter.tokensPerInterval |
how many requests per interval | 150 |
rateLimiter.interval |
the interval in which the tokens are being refilled | "hour" |
rateLimiter.fireImmediately |
if the limiter should fire immediately | true |
export default defineNuxtConfig({
modules: ["docus-feedback"],
feedback: {
isEnabled: true,
autoUserTracking: true,
rateLimiter: {
throwError: false,
tokensPerInterval: 150,
interval: "hour",
fireImmediately: true,
},
}
});
# Install dependencies
pnpm install
# Generate type stubs
pnpm run dev:prepare
# Develop with the playground
pnpm run dev
Copyright (c) 2023 Conner Luka Bachmann & Matteo Rezzin MIT License