diff --git a/docs/.vitepress/config.mjs b/docs/.vitepress/config.mjs index f01add9..356ae83 100644 --- a/docs/.vitepress/config.mjs +++ b/docs/.vitepress/config.mjs @@ -27,14 +27,14 @@ export default defineConfig({ nav: [ { text: "Home", link: "/" }, { text: "Docs", link: "/guide" }, - { text: "Demo", link: "/guide/demo.md" }, + { text: "Demo", link: "https://cap-starter.glitch.me/" }, ], sidebar: [ { text: "Quickstart", link: "/guide/index.md" }, { text: "Effectiveness", link: "/guide/effectiveness.md" }, { text: "Floating mode", link: "/guide/floating.md" }, - { text: "Demo", link: "/guide/demo.md" }, + { text: "Demo", link: "https://cap-starter.glitch.me/" }, ], socialLinks: [ diff --git a/docs/guide/demo.md b/docs/guide/demo.md deleted file mode 100644 index 5f4c419..0000000 --- a/docs/guide/demo.md +++ /dev/null @@ -1,21 +0,0 @@ -# Demo - -**Note:** The docs demo might not work. Please download and use the code from the [demo folder in the repo](https://github.com/tiagorangel1/cap/tree/main/demo) instead — it includes all of the setup needed with an Express.js server. - -### Normal button: - - - -```html - -``` - -### Floating button: - - - -```html - - - -``` \ No newline at end of file diff --git a/docs/guide/index.md b/docs/guide/index.md index 36fc14f..9bef5bc 100644 --- a/docs/guide/index.md +++ b/docs/guide/index.md @@ -46,8 +46,6 @@ widget.addEventListener("solve", function (e) { Alternatively, you can use `onsolve=""` directly within the widget or wrap the widget in a `
` (where Cap will automatically submit the token alongside other form data). - - ## Server-side Cap is fully self-hosted, so you'll need to start a server with the Cap API running at the same URL as specified in the `data-cap-api-endpoint` attribute. This is easy since we've already pre-made a library to help you generate and validate challenges for you. @@ -57,6 +55,9 @@ Start by installing it using npm or bun: npm i @cap.js/server ``` +> [!NOTE] +> It is recommended to use at least Node.js 14 or Bun 1.0.0. You might experience multiple issues on older versions of these runtimes. + Now, you'll need to change your server code to add the routes that Cap needs to work. Here's an example with Express.js: ```js diff --git a/docs/index.md b/docs/index.md index 31248a9..817abe6 100644 --- a/docs/index.md +++ b/docs/index.md @@ -12,7 +12,7 @@ hero: link: /guide - theme: alt text: Demo - link: /guide/demo.md + link: https://cap-starter.glitch.me/ features: - icon: ⚡️