Arcjet helps developers protect their apps in just a few lines of code. Bot detection. Rate limiting. Email validation. Attack protection. Data redaction. A developer-first approach to security.
Try an Arcjet protected app live at https://example.arcjet.com.
These docs are built using Astro and Starlight. All commands are run from the root of the project, from a terminal:
| Command | Action |
|---|---|
npm install |
Installs dependencies |
npm run dev |
Starts local dev server at localhost:4321 |
npm run build |
Build your production site to ./dist/ |
npm run preview |
Preview your build locally, before deploying |
npm run astro ... |
Run CLI commands like astro add, astro check |
npm run astro -- --help |
Get help using the Astro CLI |
- in
lib/prefs.tsadd the key and label to theframeworksarray - in
src/components/icons/tech/$Framework.tsxadd an icon - in
src/components/FrameworkSwitcher.tsxreference the icon in theframeworkIconobject - in
src/components/FrameworkLinks.tsxadd acase "$framework"for the icon - in
src/content/docs/get-started.mdxadd toframeworksandtitleByFramework, define steps, and use those steps where appropriate - in
src/content/docs/reference/$framework.mdxwrite a reference guide - in
src/components/SdkReferenceLinkByFramework.mdxandsrc/lib/sidebar.tslink that reference - in
public/llms.txtunder SDKs link that reference
To add a framework option to a page such as src/content/docs/get-started.mdx:
-
Add your framework to the frontmatter
frameworks -
Add the page title to the frontmatter
titleByFramework -
Use
<SlotByFramework />or<TextByFramework />components to display content for the currently selected framework:<SlotByFramework client:load> ... <SomeContent slot="$framework" /> </SlotByFramework>
This will make
<SomeContent />only visible when the new framework is selected.
We provide a framework selection component for each page including the docs home. However the docs home is the only page that always display the links. The other pages will hide the component if a framework is already selected.
In home:
<FrameworkLinks
title="Get started"
path="/get-started"
alwaysShow
client:load
/>Join our Discord server or reach out for support.
This repository follows the Arcjet Security Policy.
All content in this repository is licensed under the Creative Commons Attribution 4.0 International License and all code is licensed under the Apache License, Version 2.0.