0.1.1 • Published 2 months ago

astro-turnstile v0.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
2 months ago

Astro Turnstile

THIS PACKAGE IS CURRENTLY IN DEVELOPMENT AND IS NOT YET READY FOR USE

This is an Astro integration that allows you to add a turnstile to your Astro site.

Usage

Prerequisites

Before you can use this integration, you need to have a Cloudflare account. You can sign up for a free account here.

Getting Started

First, you need to create a new site in your Cloudflare account. You can do this by following the instructions here.

Once you have created a site, you will be given a site key and a secret key. You will need this key to configure the integration.

Installation

Install the integration automatically using the Astro CLI:

pnpm astro add astro-turnstile
npx astro add astro-turnstile
yarn astro add astro-turnstile
bunx astro add astro-turnstile

Or install it manually:

  1. Install the required dependencies
pnpm add astro-turnstile
npm install astro-turnstile
yarn add astro-turnstile
bun add astro-turnstile
  1. Add the integration to your astro config
+import astroTurnstile from "astro-turnstile";

export default defineConfig({
  integrations: [
+    astroTurnstile(),
  ],
});

Configuration

You can configure the integration by passing an object to the astroTurnstile function. The following options are available:

  • siteKey (required): Your Turnstile site key
  • `secretKey (required): Your Turnstile secret key - this should be kept secret

Contributing

This package is structured as a monorepo:

  • playground contains code for testing the package
  • package contains the actual package

Install dependencies using pnpm:

pnpm i --frozen-lockfile

Start the playground:

pnpm playground:dev

You can now edit files in package. Please note that making changes to those files may require restarting the playground dev server.

Licensing

MIT Licensed. Made with ❤️ by Hunter Bertoson.

Acknowledgements

Astro Turnstile Florian Lefebvre

0.1.1

2 months ago

0.1.0

2 months ago

0.0.2

2 months ago

0.0.1

4 months ago