The new docs website for Casbin based on Fumadocs

Clone this repo:
  1. e4e73b9 feat: fix category URL 404 error by adding category redirect middleware (#68) by TTT · 7 weeks ago master v3.7.0
  2. f5c96a6 feat: fix copy markdown error (#64) by TTT · 8 weeks ago v3.6.0
  3. b3ae84f feat: show error message for "Copy Markdown" button (#61) by Yang Luo · 8 weeks ago v3.5.0
  4. caa658d feat: move comment widget below navigation in blog articles (#60) by Yang Luo · 8 weeks ago v3.4.0
  5. 25a3952 feat: make Copy Markdown + Open buttons and author metadata in the same row (#50) by Yang Luo · 8 weeks ago

Casbin Website V3

GitHub Action Release Discord License

The official website for Casbin. Casbin is an authorization library that supports access control models like ACL, RBAC, ABAC for Golang, Java, C#, JavaScript, Python, PHP and other languages.

This is a Next.js application built with Fumadocs, a modern documentation framework.

Live Site

Visit the live site at: https://casbin.org

Get Started

Requirements

  1. Git
  2. Node.js: v20 or above
  3. npm (comes with Node.js)

Running Locally

  1. Clone the repository:

    git clone https://github.com/casbin/casbin-website-v3.git
    cd casbin-website-v3
    
  2. Install dependencies:

    npm ci
    
  3. Start the development server:

    npm run dev
    
  4. Open http://localhost:3000 with your browser to see the result.

Project Structure

In the project, you can see:

  • source.config.ts: Configuration for content source adapter
  • src/lib/source.ts: Code for content source adapter, loader() provides the interface to access your content
  • src/lib/layout.shared.tsx: Shared options for layouts
RouteDescription
app/(home)The route group for your landing page and other pages
app/docsThe documentation layout and pages
app/api/search/route.tsThe Route Handler for search

Scripts

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm run start - Start production server
  • npm run lint - Run ESLint
  • npm run format - Format code with Prettier
  • npm run format:check - Check code formatting
  • npm run types:check - Type check the project

Contributing

We welcome contributions! Here's how you can help:

Documentation Writing

For the configuration of the sidebar and navigation, refer to the Fumadocs documentation.

For the features that you may use when writing documents, please refer to Markdown Features.

Reporting Issues

If you find any issues or have suggestions, please open an issue on our GitHub Issues page.

Submitting Pull Requests

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes using Conventional Commits format
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Note: This project uses semantic-release for automated version management and package publishing. Please use conventional commit messages (e.g., feat:, fix:, docs:) for your commits.

Learn More

To learn more about Next.js and Fumadocs, take a look at the following resources:

License

This project is licensed under the Apache-2.0 License.