Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add docs-links-check ci and fix dead links #506

Merged
merged 1 commit into from
Jul 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/docs-links-check-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Check links for modified docs

on:
pull_request:
paths:
- 'docs/**'

jobs:
docs-links-check:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@master

- name: Check links for mdx files 🔎
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
use-quiet-mode: 'yes' # only show errors in output.
# use-verbose-mode: 'yes' # show detailed HTTP status for checked links.
# refer to https://github.com/tcort/markdown-link-check#config-file-format
config-file: '.github/workflows/docs.links.check.config.json'
check-modified-files-only: 'yes'
file-extension: '.mdx'

- name: Check links for markdown files 🔎
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
use-quiet-mode: 'yes' # only show errors in output.
# use-verbose-mode: 'yes' # show detailed HTTP status for checked links.
# refer to https://github.com/tcort/markdown-link-check#config-file-format
config-file: '.github/workflows/docs.links.check.config.json'
check-modified-files-only: 'yes'
file-extension: '.md'
23 changes: 23 additions & 0 deletions .github/workflows/docs-links-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Docs Links Check

on:
workflow_dispatch:
schedule:
- cron: "0 12 * * 6" # runs every saturday at 12:00 UTC

jobs:
docs-links-check:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@master

- name: Check Links 🔎
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
use-quiet-mode: 'yes' # only show errors in output.
# use-verbose-mode: 'yes' # show detailed HTTP status for checked links.
folder-path: 'docs/' # only check the docs/ folder
# refer to https://github.com/tcort/markdown-link-check#config-file-format
config-file: '.github/workflows/docs.links.check.config.json'
file-extension: '.md*' # .md or .mdx
43 changes: 43 additions & 0 deletions .github/workflows/docs.links.check.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"ignorePatterns": [
{
"pattern": "^[^h]"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

},
{
"pattern": "^http://localhost"
},
{
"pattern": "^http://your-casdoor-url.com"
},
{
"pattern": "^http://your-site-url.com"
},
{
"pattern": "^https://my-site-url.com"
},
{
"pattern": "^http://SERVER_IP"
},
{
"pattern": "^https://[a-z]*.mycompany.com/"
},
{
"pattern": "^https://flarum.org/"
},
{
"pattern": "^https://dash.cloudflare.com/"
},
{
"pattern": "^https://developer.android.com/guide/topics/manifest/manifest-element#package"
},
{
"pattern": "^https://developer.twitter.com/en/portal/dashboard"
},
{
"pattern": "^https://www.epis2048.net/2022/modify-cloudreve-to-support-casdoor/index.html"
},
{
"pattern": "^https://www.epis2048.net/2022/modify-kodexplorer-to-support-casdoor/index.html"
}
]
}
2 changes: 1 addition & 1 deletion docs/basic/server-installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ enableGzip = true
Despite all the configurable fields, as a beginner, you only need to modify two items: `driverName` and `dataSourceName` based on your database. This database will be used by Casdoor to store all data, including users, organizations, applications and so on.
- `tableNamePrefix` is prefix of the table when using adapter.
- `showSql` : show SQL statement or not on logger if log level is great than INFO.
- `redisEndpoint` is the Redis endpoint used by Beego session storage. If this parameter is empty, the session data will be stored locally as files in `./tmp` folder. For using Redis as Beego session storage, an example for this value would be: `redis.example.com:6379`. If Redis is deployed in the local machine, you can use `localhost:6379`. If Redis password is enabled, use `redis.example.com:6379,db,password`. See more details at: https://beego.run/docs/module/session.md#saving-provider-config
- `redisEndpoint` is the Redis endpoint used by Beego session storage. If this parameter is empty, the session data will be stored locally as files in `./tmp` folder. For using Redis as Beego session storage, an example for this value would be: `redis.example.com:6379`. If Redis is deployed in the local machine, you can use `localhost:6379`. If Redis password is enabled, use `redis.example.com:6379,db,password`. See more details at: https://github.com/beego/beedoc/blob/master/en-US/module/session.md#saving-provider-config
- `defaultStorageProvider` is the default file storage service name. If you need to use file storage services such as avatar upload, you need to set up a storage provider and apply it in your application. See [**storage**](/docs/provider/storage/overview) for details.
- `isCloudIntranet` is used to identify whether your provider endpoint is intranet endpoint.
- `authState` is the authorization application name. This parameter will be checked when logging in.
Expand Down
6 changes: 0 additions & 6 deletions docs/how-to-connect/cas.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,3 @@ For all the appearances of parameter 'casServerLoginUrl' change them to
```

If you need to customize more configurations, see <https://github.com/apereo/java-cas-client> for detailed information.

:::note

Actually, we have already have this demo app run on <https://cas-java-app.casdoor.com>. You can visit here to experience using Casdoor via CAS.

:::
4 changes: 1 addition & 3 deletions docs/how-to-connect/oidc-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,7 @@ Here we list a few OIDC client libraries for some languages like Go and Java:
The above table is far from being complete. For a full list of OIDC client libraries, please see more details at:

1. https://oauth.net/code/
2. https://openid.net/
1. [Certified OpenID Connect Implementations](https://openid.net/developers/certified/)
1. [Uncertified OpenID Connect Implementations](https://openid.net/developers/uncertified/)
2. https://openid.net/certified-open-id-developer-tools/

## OIDC UserInfo fields

Expand Down
2 changes: 1 addition & 1 deletion docs/integration/lua/apisix.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ The following are some of the names in the configuration:

### Step1. Deploy Casdoor and APISIX

Firstly, the [Casdoor](/docs/basic/server-installation) and [APISIX](https://apisix.apache.org/docs/apisix/how-to-build/) should be deployed.
Firstly, the [Casdoor](/docs/basic/server-installation) and [APISIX](https://apisix.apache.org/docs/apisix/installation-guide/) should be deployed.

After a successful deployment, you need to ensure:

Expand Down
2 changes: 1 addition & 1 deletion docs/integration/ruby/gitlab.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Open your favorite browser and visit: **http://`CASDOOR_HOSTNAME`/.well-known/op

## Step3. Configure GitLab

You can follow the steps below to set this up, or make custom changes according to [this document](https://docs.gitlab.com/14.6/ee/administration/auth/oidc.html)(e.g., you are installing GitLab using source code rather than Omnibus).
You can follow the steps below to set this up, or make custom changes according to [this document](https://archives.docs.gitlab.com/14.6/ee/administration/auth/oidc.html)(e.g., you are installing GitLab using source code rather than Omnibus).

1. On your GitLab server, open the configuration file.

Expand Down
2 changes: 1 addition & 1 deletion docs/permission/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ All users associated with a single Casdoor organization are shared between the o

Before going further, you should have an understanding of how Casbin works and its related concepts, such as Model, Policy, and Adapter. In short, Model defines your permission policy structure, and how requests should match these permission policies and their effects. Policy is the description of your specific permission rules. After Casbin obtains Model and Policy information, it can enforce permission control on incoming requests. As an abstraction layer, Adapter shields the source of Policy for Casbin's executor, so that Policy can be stored everywhere, such as files or databases.

Back to the topic of permission configuration in Casdoor. In the Casdoor Web UI, you can add a Model for your organization in the `Model` configuration item, and a Policy for your organization in the `Permission` configuration item. With [Casbin Online Editor](https://casbin.org/casbin-editor/), you can get Model and Policy files suitable for your usage scenarios. You can easily import the Model file into Casdoor through the Casdoor Web UI for use by the built-in Casbin. But for Policy (that is, the `Permission` configuration item in the Casdoor Web UI), some additional instructions are required here. Let us continue to mention later.
Back to the topic of permission configuration in Casdoor. In the Casdoor Web UI, you can add a Model for your organization in the `Model` configuration item, and a Policy for your organization in the `Permission` configuration item. With [Casbin Online Editor](https://casbin.org/editor), you can get Model and Policy files suitable for your usage scenarios. You can easily import the Model file into Casdoor through the Casdoor Web UI for use by the built-in Casbin. But for Policy (that is, the `Permission` configuration item in the Casdoor Web UI), some additional instructions are required here. Let us continue to mention later.

Just as your application needs to enforce permission control through the built-in Casbin of Casdoor, as a built-in application, Casdoor also uses its Model and Policy to control the calling permissions of the API interface through Casbin. However, Casdoor can call Casbin from internal code, but external applications cannot. Therefore, Casdoor exposes an API for calling the built-in Casbin to external applications. We will show you the definitions of these API interfaces and how to use them later.

Expand Down
2 changes: 1 addition & 1 deletion docs/provider/captcha/recaptcha.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ reCAPTCHA is provided by Google. And we use reCAPTCHA v2 Checkbox . You can see

To start using reCAPTCHA, you need to [sign up for an API key pair](http://www.google.com/recaptcha/admin) for your site. The key pair consists of a site key and secret key. The site key is used to invoke reCAPTCHA service on your site or mobile application. The secret key authorizes communication between your application backend and the reCAPTCHA server to [verify the user's response](https://developers.google.com/recaptcha/docs/verify).

First, choose the [type of reCAPTCHA](https://developers.google.com/recaptcha/docs/versions) and then fill in authorized domains or [package names.](https://developer.android.com/guide/topics/manifest/manifest-element.html#package) After you have accepted the terms of service, click **Register** to get a new API key pair.
First, choose the [type of reCAPTCHA](https://developers.google.com/recaptcha/docs/versions) and then fill in authorized domains or [package names.](https://developer.android.com/guide/topics/manifest/manifest-element#package) After you have accepted the terms of service, click **Register** to get a new API key pair.

![recaptcha create apiKey](/img/providers/captcha/recaptcha_create_apiKey.png)

Expand Down