Skip to content
Snippets Groups Projects
README.md 3.09 KiB
Newer Older
YunShu's avatar
YunShu committed
# [casdoor.org](https://casdoor.org) [![Build and Deploy](https://github.com/casdoor/casdoor-website/actions/workflows/master.yml/badge.svg)](https://github.com/casdoor/casdoor-website/actions/workflows/master.yml)
Yang Luo's avatar
Yang Luo committed

YunShu's avatar
YunShu committed
The configuration and documentation of Casdoor website: <https://casdoor.org/>.
Yang Luo's avatar
Yang Luo committed

Casdoor website is built using [Docusaurus](https://docusaurus.io/), you can get the PDF at [casdoor.org/pdf](https://casdoor.org/pdf/) or [GitHub Action](https://github.com/casdoor/casdoor-website/actions/workflows/master.yml).
Yang Luo's avatar
Yang Luo committed

YunShu's avatar
YunShu committed
## Get Started
YunShu's avatar
YunShu committed
### Requirements
YunShu's avatar
YunShu committed
1. [Git](https://git-scm.com/downloads)
2. [Node.js](https://nodejs.org/en/download/):v16.14 or above
3. [Yarn](https://classic.yarnpkg.com/en/docs/install): please use Yarn 1
YunShu's avatar
YunShu committed
### Running Locally
YunShu's avatar
YunShu committed
1. `git clone https://github.com/casdoor/casdoor-website.git`
2. `cd casdoor-website`
3. `yarn`: install dependencies.
4. `yarn start`: starting the development server.
YunShu's avatar
YunShu committed
## Contributing
YunShu's avatar
YunShu committed
You can contribute to the documentation site in different ways: [Documentation Writing](#documentation-writing), [Translation](#translation), [Website Development](#website-development).
YunShu's avatar
YunShu committed
### Documentation Writing
YunShu's avatar
YunShu committed
For the configuration of the sidebar, you can refer to [Sidebar](https://docusaurus.io/docs/sidebar).
YunShu's avatar
YunShu committed
For the features that you may use when writing documents, please refer to [Markdown Features](https://docusaurus.io/docs/markdown-features).
YunShu's avatar
YunShu committed
A standard document should look like this:
YunShu's avatar
YunShu committed
````md
---
title: Title
description: description
keywords: [keyword1, keyword2]
---
YunShu's avatar
YunShu committed
## Headers
YunShu's avatar
YunShu committed
Only h2 and h3 will be in the TOC by default.
YunShu's avatar
YunShu committed
### h3
YunShu's avatar
YunShu committed
content
YunShu's avatar
YunShu committed
#### h4
YunShu's avatar
YunShu committed
content
YunShu's avatar
YunShu committed
````
YunShu's avatar
YunShu committed
#### Caution
YunShu's avatar
YunShu committed
##### Admonitions
YunShu's avatar
YunShu committed
You can add [Admonitions](https://docusaurus.io/docs/markdown-features/admonitions) in the documentation, but please leave two blank lines like this:
YunShu's avatar
YunShu committed
```md
:::info Title
YunShu's avatar
YunShu committed
Title is optional
YunShu's avatar
YunShu committed
:::
```
YunShu's avatar
YunShu committed
##### JSX
YunShu's avatar
YunShu committed
You can use JSX in documents, such as the [Tabs](https://docusaurus.io/docs/markdown-features/tabs) component provided by Docusaurus, but to prevent Crowdin from breaking the code ([mdx-solutions](https://docusaurus.io/docs/i18n/crowdin#mdx-solutions)), please wrap the JSX code:
YunShu's avatar
YunShu committed
`````md
YunShu's avatar
YunShu committed
````mdx-code-block
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
YunShu's avatar
YunShu committed
<Tabs>
  <TabItem value="go" label="Go">
YunShu's avatar
YunShu committed
  content
YunShu's avatar
YunShu committed
  </TabItem>
  <TabItem value="java" label="Java">
YunShu's avatar
YunShu committed
  content
YunShu's avatar
YunShu committed
  </TabItem>
</Tabs>
````
YunShu's avatar
YunShu committed
`````
YunShu's avatar
YunShu committed
### Translation
YunShu's avatar
YunShu committed
[Crowdin](https://crowdin.com/project/casdoor-website) and [Docusaurus i18n](https://docusaurus.io/docs/i18n/introduction) is used for Casdoor website's translation.
YunShu's avatar
YunShu committed
Note: Please do not translate strings like `:::note`, `:::tip`, wrong translation may cause typographical error([casdoor-website#305](https://github.com/casdoor/casdoor-website/issues/305)).
YunShu's avatar
YunShu committed
### Website Development
YunShu's avatar
YunShu committed
See [Creating Pages](https://docusaurus.io/docs/creating-pages) to learn how to create a page.
YunShu's avatar
YunShu committed
See [Styling and Layout](https://docusaurus.io/docs/styling-layout) to learn how to modify styles.
YunShu's avatar
YunShu committed
See [Swizzling](https://docusaurus.io/docs/swizzling) to learn how to modify Docusaurus built-in components.
YunShu's avatar
YunShu committed
## LICENSE
YunShu's avatar
YunShu committed
[Apache-2.0 license](./LICENSE).