Source for the official Apache Casbin documentation site. Casbin is under incubation at the Apache Software Foundation (ASF). The site is built with Docusaurus v3.
- Live site: casbin.apache.org
- Source repository: github.com/apache/casbin-website
On push to master or manual dispatch, the Build and Deploy workflow:
- Installs dependencies and, for non–pull-request runs, runs Crowdin sync (
yarn crowdin:sync; requires theCROWDIN_PERSONAL_TOKENrepository secret). - Runs
yarn buildto produce the static site. - Publishes the
build/output to theasf-sitebranch of this repository (via peaceiris/actions-gh-pages).
ASF infrastructure serves the site from asf-site as configured in .asf.yaml. Pull requests run the workflow without Crowdin sync or publishing to asf-site.
Additional checks (Markdown lint, doc link checks, etc.) live under .github/workflows/.
- Git
- Node.js 20.x or later (matches
enginesinpackage.jsonand CI) - Yarn Classic (v1)
git clone https://github.com/apache/casbin-website.git
cd casbin-website
yarn install
yarn startOther useful scripts: yarn build, yarn serve, yarn lint.
You can help with documentation, translations, and front-end work. Mailing lists and project metadata are listed on the incubator status page (for example dev@casbin.apache.org). On-site contributing guidance is also available under Docs → Start Contributing on the published site.
For the sidebar, see Docusaurus: Sidebar. For Markdown/MDX features, see Markdown Features.
A typical doc front matter and structure:
---
title: Title
description: description
keywords: [keyword1, keyword2]
authors: [GitHub username]
---
## Headers
Only h2 and h3 will be in the TOC by default, so h1 is not recommended to use.
### h3
content
#### h4
content
We use markdownlint-cli for Markdown/MDX:
yarn lint:mdFor VS Code, Sublime, or Vim/Neovim, consider a markdownlint extension.
You can use Admonitions; leave blank lines around blocks, for example:
:::info Title
Title is optional
:::You can use JSX in docs (e.g. Tabs). To avoid Crowdin breaking code, follow mdx-solutions and wrap JSX with mdx-code-block:
```mdx-code-block
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
```
```mdx-code-block
<Tabs>
<TabItem value="go" label="Go">
```
content
```mdx-code-block
</TabItem>
<TabItem value="java" label="Java">
```
content
```mdx-code-block
</TabItem>
</Tabs>
```
Crowdin and Docusaurus i18n are used for translations.
Do not translate directive strings like :::note or :::tip; wrong translations can break rendering.
Do not translate interpolation placeholders in sentences such as:
At our {repoLink}, browse and submit {issueLink} or {prLink} for bugs you find or any new features you may want implemented.
Keep {repoLink}, {issueLink}, etc. as-is; see translate props.
Do not translate metadata lines like authors: [casbin].
Apache Casbin is an effort undergoing incubation at the ASF. Apache®, the Apache feather logo, and related marks are trademarks of The Apache Software Foundation. See the incubator status page and the ASF trademark policy.