https://github.com/arcjet/arcjet-docs
Arcjet's documentation.
https://github.com/arcjet/arcjet-docs
arcjet astro devtools docs markdown security-tools
Last synced: 9 months ago
JSON representation
Arcjet's documentation.
- Host: GitHub
- URL: https://github.com/arcjet/arcjet-docs
- Owner: arcjet
- License: cc-by-4.0
- Created: 2024-08-17T09:26:11.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-05T15:57:47.000Z (over 1 year ago)
- Last Synced: 2025-02-06T12:42:11.768Z (over 1 year ago)
- Topics: arcjet, astro, devtools, docs, markdown, security-tools
- Language: MDX
- Homepage: https://docs.arcjet.com
- Size: 7.99 MB
- Stars: 9
- Watchers: 3
- Forks: 5
- Open Issues: 27
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Arcjet Docs
[View the docs](docs).
[Arcjet][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][example-url].
## Commands
These docs are built using [Astro][astro] and [Starlight][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 |
## Adding content
### Add a framework
- in `lib/prefs.ts` add the key and label to the `frameworks` array
- in `src/components/icons/tech/$Framework.tsx` add an icon
- in `src/components/FrameworkSwitcher.tsx` reference the icon in the
`frameworkIcon` object
- in `src/components/FrameworkLinks.tsx` add a `case "$framework"` for the icon
- in `src/content/docs/get-started.mdx` add to `frameworks` and
`titleByFramework`, define steps, and use those steps where appropriate
- in `src/content/docs/reference/$framework.mdx` write a reference guide
- in `src/components/SdkReferenceLinkByFramework.mdx` and `src/lib/sidebar.ts`
link that reference
- in `public/llms.txt` under SDKs link that reference
### Add framework options to a page
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 `` or `` components to display
content for the currently selected framework:
```mdx
...
```
This will make `` only visible when the new framework is selected.
### In-page framework links
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:
```mdx
```
## Support
[Join our Discord server][discord-invite] or [reach out for support][support].
## Security
This repository follows the [Arcjet Security Policy][arcjet-security].
## License
All content in this repository is licensed under the [Creative Commons
Attribution 4.0 International License](./LICENSE) and all code is licensed under
the [Apache License, Version 2.0](./LICENSE-CODE).
[arcjet]: https://arcjet.com
[astro]: https://astro.build
[starlight]: https://starlight.astro.build
[arcjet-security]: https://docs.arcjet.com/security
[example-url]: https://example.arcjet.com
[discord-invite]: https://arcjet.com/discord
[support]: https://docs.arcjet.com/support