From fc330a83877d35ddfdca3bbf6f18ea99c7003cd2 Mon Sep 17 00:00:00 2001 From: Yecheng Fu Date: Mon, 24 Feb 2020 12:00:48 +0800 Subject: [PATCH] re-enable links must start with slash (#1847) --- dev-guide/deploy.md | 8 ++++---- dev-guide/develop.md | 2 +- dev-guide/requirements.md | 2 +- scripts/markdown-link-check.tpl | 4 ++++ scripts/verify-links.sh | 2 +- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/dev-guide/deploy.md b/dev-guide/deploy.md index 216cb4f3cf630..3b061a0c48b6b 100644 --- a/dev-guide/deploy.md +++ b/dev-guide/deploy.md @@ -1,13 +1,13 @@ # Build for deployment -The easiest way to deploy TiDB is to use Docker Compose, see [TiDB Docker Compose Deployment](../how-to/get-started/deploy-tidb-from-docker-compose.md). For more deployment methods, see [TiDB deployment methods](/_index.md). +The easiest way to deploy TiDB is to use Docker Compose, see [TiDB Docker Compose Deployment](/how-to/get-started/deploy-tidb-from-docker-compose.md). For more deployment methods, see [TiDB deployment methods](/_index.md). ## Before you begin -You need to check the [supported platforms](./requirements.md#supported-platforms) and [prerequisites](./requirements.md#prerequisites) first. +You need to check the [supported platforms](/dev-guide/requirements.md#supported-platforms) and [prerequisites](/dev-guide/requirements.md#prerequisites) first. ## Build and install TiDB components -You can use the [build script](../scripts/build.sh) to build and install TiDB components in the `bin` directory. +You can use the [build script](/scripts/build.sh) to build and install TiDB components in the `bin` directory. -You can use the [update script](../scripts/update.sh) to update all the TiDB components to the latest version. +You can use the [update script](/scripts/update.sh) to update all the TiDB components to the latest version. diff --git a/dev-guide/develop.md b/dev-guide/develop.md index 8c9d05667cb15..08ab286fc15a3 100644 --- a/dev-guide/develop.md +++ b/dev-guide/develop.md @@ -4,7 +4,7 @@ If you want to develop the TiDB project, you can follow this guide. ## Before you begin -You need to check the [supported platforms](./requirements.md#supported-platforms) and [prerequisites](./requirements.md#prerequisites) first. +You need to check the [supported platforms](/dev-guide/requirements.md#supported-platforms) and [prerequisites](/dev-guide/requirements.md#prerequisites) first. ## Build TiKV diff --git a/dev-guide/requirements.md b/dev-guide/requirements.md index 394c73dbf7c41..a11bd52477cbd 100644 --- a/dev-guide/requirements.md +++ b/dev-guide/requirements.md @@ -19,6 +19,6 @@ The following table lists TiDB support for common architectures and operating sy + GCC 4.8+ with static library + CMake 3.1+ -The [check requirement script](../scripts/check_requirement.sh) can help you check prerequisites and install the missing ones automatically. +The [check requirement script](/scripts/check_requirement.sh) can help you check prerequisites and install the missing ones automatically. TiKV is well tested in a certain Rust version by us, and the exact version can be found in the `RUST_VERSION` file in TiKV's root directory. It is recommended to use the same version as we do. diff --git a/scripts/markdown-link-check.tpl b/scripts/markdown-link-check.tpl index e3b9a848e6818..ec176be838239 100644 --- a/scripts/markdown-link-check.tpl +++ b/scripts/markdown-link-check.tpl @@ -12,6 +12,10 @@ } ], "replacementPatterns": [ + { + "pattern": "^(?!(/|/media/))", + "replacement": "/ERROR:link-must-start-with-slash:" + }, { "comment": "prefix with repo root", "pattern": "^(?!(\\.|/ERROR:.*))", diff --git a/scripts/verify-links.sh b/scripts/verify-links.sh index 15ff49c4f3aae..bdeac45cbc0bf 100755 --- a/scripts/verify-links.sh +++ b/scripts/verify-links.sh @@ -60,7 +60,7 @@ while read -r tasks; do ) & done wait -done <<<"$(find "." -type f -name '*.md' | xargs -n 10)" +done <<<"$(find "." -type f -not -path './node_modules/*' -name '*.md' | xargs -n 10)" error_files=$(cat $ERROR_REPORT | grep 'FILE: ' | wc -l) error_output=$(cat $ERROR_REPORT)