Skip to content

Commit 7dfdda1

Browse files
update structure
1 parent fd4defe commit 7dfdda1

File tree

13 files changed

+85
-293
lines changed

13 files changed

+85
-293
lines changed

src/content/docs/turnstile/api-reference.mdx

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: Cloudflare Challenges
3+
pcx_content_type: navigation
4+
external_link: /cloudflare-challenges/
5+
sidebar:
6+
order: 2
7+
8+
---
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: Concepts
3+
pcx_content_type: navigation
4+
sidebar:
5+
order: 3
6+
group:
7+
hideIndex: true
8+
9+
---
10+
11+
import { DirectoryListing } from "~/components"
12+
13+
Refer to the following pages for more information about Turnstile's concepts:
14+
15+
<DirectoryListing />

src/content/docs/turnstile/widgets.mdx renamed to src/content/docs/turnstile/concepts/widgets.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Turnstile widgets
33
pcx_content_type: reference
44
sidebar:
5-
order: 3
5+
order: 1
66
---
77

88
import { GlossaryTooltip, Render } from "~/components"
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ function onTurnstileExpired() {
160160
```
161161
</Details>
162162

163-
### Automatic form integration
163+
<Details header="Automatic form integration">
164164

165165
When you embed a Turnstile widget inside a `<form>` element, an invisible input field with the name `cf-turnstile-response` is automatically created. This field contains the verification token and gets submitted with your other form data.
166166

@@ -173,6 +173,7 @@ When you embed a Turnstile widget inside a `<form>` element, an invisible input
173173
<button type="submit">Submit</button>
174174
</form>
175175
```
176+
</Details>
176177

177178
---
178179

@@ -192,7 +193,7 @@ Cloudflare recommends using explicit rendering on the following scenarios:
192193

193194
### Implementation
194195

195-
#### 1. Add the script with explicit rendering
196+
#### 1. Add the script to your website with explicit rendering
196197

197198
```html wrap
198199
<script src="https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit" defer></script>

src/content/docs/turnstile/get-started/index.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Every widget has:
3131
- **Configuration**: Mode, hostnames, appearance settings, and other options
3232

3333
:::note[Important]
34-
Regardless of how you create and manage your widgets, you will still need to [embed the widget](/turnstile/get-started/widget-management/client-side-rendering/) on your webpage and [validate the response](/turnstile/get-started/widget-management/server-side-validation/) on your server.
34+
Regardless of how you create and manage your widgets, you will still need to [embed the widget](/turnstile/get-started/widget-management/client-side-rendering/) on your webpage and [validate the token](/turnstile/get-started/widget-management/server-side-validation/) on your server.
3535
:::
3636

3737
Implementing Turnstile involves two essential components that work together:
@@ -40,7 +40,7 @@ Implementing Turnstile involves two essential components that work together:
4040

4141
Add the Turnstile widget to your webpage to challenge visitors and generate verification tokens.
4242

43-
2. **Server-side**: [Validate the response](/turnstile/get-started/widget-management/server-side-validation/)
43+
2. **Server-side**: [Validate the token](/turnstile/get-started/widget-management/server-side-validation/)
4444

4545
Verify the tokens on your server using the Siteverify API to ensure they are authentic and have not been tampered with.
4646

@@ -70,7 +70,7 @@ Refer to [Embed the widget](/turnstile/get-started/widget-management/client-side
7070

7171
Implement server-side validation to verify the tokens generated by your widgets.
7272

73-
Refer to [Validate the widget response](/turnstile/get-started/widget-management/server-side-validation/) to secure your implementation with proper token verification.
73+
Refer to [Validate the token](/turnstile/get-started/widget-management/server-side-validation/) to secure your implementation with proper token verification.
7474

7575
## Additional implementation options
7676

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Validate the widget response
2+
title: Validate the token
33
pcx_content_type: get-started
44
sidebar:
55
order: 4
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ sidebar:
77

88
import { APIRequest } from "~/components"
99

10-
Use the [Cloudflare API](/api/) for programmatic widget management and automation.
10+
Use the [Cloudflare API](/api/resources/turnstile/) for programmatic widget management and automation.
1111

1212
## Prerequisites
1313

0 commit comments

Comments
 (0)