From 1093404bcc62a909304d72983668ad53c0118ff9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Norbert=20Kami=C5=84ski?= Date: Fri, 4 Aug 2023 02:40:49 +0200 Subject: [PATCH] README.md: Update documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Norbert KamiƄski --- README.md | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/README.md b/README.md index 91b385f..afa0789 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,65 @@ additional layer of control and verification in the beta/prod environment. > by rebasing you branch: `git rebase --onto `. For > example: `git rebase --onto develop main`. +### Broken links checker + +Currently we are using [lychee](https://github.com/lycheeverse/lychee) a fast, +async, stream-based link checker written in Rust. The automatic check is +triggered on each push to the master pull request. + +You can also run it locally using a docker image: + +```bash +$ docker run --init -it --rm -w $(pwd) -v $(pwd):$(pwd) lycheeverse/lychee + --max-redirects 10 -a 403,429,500,502,503,999 . +``` + +### Relative links + +Please avoid using relative like: + +```md +[contact](../../contact/) +``` + +Instead, use absolute links: + +```md +[contact](https://3mdeb.com/contact/) +``` + +### pre-commit hooks + +- [Install pre-commit](https://pre-commit.com/index.html#install), if you + followed [local build](#local-preview) procedure `pre-commit` should be + installed + +- [Install go](https://go.dev/doc/install) + +- Install hooks into repo: + +```shell +pre-commit install --hook-type commit-msg +``` + +- Enjoy automatic checks on each `git commit` action! + +- (Optional) Run hooks on all files (for example, when adding new hooks or + configuring existing ones): + +```shell +pre-commit run --all-files +``` + +#### To skip verification + +In some cases, it may be needed to skip `pre-commit` tests. To do that, please +use: + +```shell +git commit --no-verify +``` + ### Grammarly - a must have for content verification Grammarly is a great, free tool for all bloggers and anyone who needs to write