From 76a85b73cefd9523d6138d50f72a5e4f60db3ccd Mon Sep 17 00:00:00 2001 From: Valentin Kiselev Date: Wed, 18 Dec 2024 12:44:12 +0300 Subject: [PATCH] docs: update the link --- README.md | 72 ++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 48 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 11a49a9b..560957a9 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ For **Python**: pip install lefthook ``` -**[Installation guide][installation]** with more ways to install lefthook: [apt](https://evilmartians.github.io/lefthook/installation/deb.html), [brew](https://evilmartians.github.io/lefthook/installation/homebrew.html), [winget](https://evilmartians.github.io/lefthook/installation/winget.html), and others. +**[Installation guide][installation]** with more ways to install lefthook: [apt][install-apt], [brew][install-brew], [winget][install-winget], and others. ## Usage @@ -69,14 +69,14 @@ git add -A && git commit -m '...' #### More details - [**Configuration**][configuration] for `lefthook.yml` config options. -- [**Usage**](./docs/usage.md) for **lefthook** CLI options, supported ENVs, and usage tips. -- [**Discussions**](https://github.com/evilmartians/lefthook/discussions) for questions, ideas, suggestions. +- [**Usage**][usage] for **lefthook** CLI options, supported ENVs, and usage tips. +- [**Discussions**][discussion] for questions, ideas, suggestions. ## Why Lefthook * ### **Parallel execution** -Gives you more speed. [Example](./docs/configuration.md#parallel) +Gives you more speed. [docs][config-parallel] ```yml pre-push: @@ -84,7 +84,7 @@ pre-push: ``` * ### **Flexible list of files** -If you want your own list. [Custom](./docs/configuration.md#files) and [prebuilt](./docs/configuration.md#run) examples. +If you want your own list. [Custom][config-files] and [prebuilt][config-run] examples. ```yml pre-commit: @@ -124,7 +124,7 @@ pre-commit: * ### **Run scripts** -If oneline commands are not enough, you can execute files. [Example](./docs/configuration.md#script). +If oneline commands are not enough, you can execute files. [docs][config-scripts] ```yml commit-msg: @@ -134,22 +134,26 @@ commit-msg: ``` * ### **Tags** -If you want to control a group of commands. [Example](./docs/configuration.md#tags). +If you want to control a group of commands. [docs][config-tags] ```yml pre-push: commands: packages-audit: - tags: frontend security - run: yarn audit + tags: + - frontend + - linters + run: yarn lint gems-audit: - tags: backend security + tags: + - backend + - security run: bundle audit ``` * ### **Support Docker** -If you are in the Docker environment. [Example](./docs/configuration.md#cmd-template). +If you are in the Docker environment. [docs][config-run] ```yml pre-commit: @@ -160,7 +164,7 @@ pre-commit: * ### **Local config** -If you a frontend/backend developer and want to skip unnecessary commands or override something into Docker. [Description](./docs/usage.md#local-config). +If you a frontend/backend developer and want to skip unnecessary commands or override something into Docker. [docs][usage-local-config] ```yml # lefthook-local.yml @@ -198,7 +202,7 @@ $ lefthook run fixer * ### **Optional output** -If you [don't want to see](./docs/configuration.md#skip_output) supporting information: +If you [don't want to see][config-skip_output] supporting information: ```yml skip_output: @@ -210,15 +214,16 @@ skip_output: ### Guides -* [Install with Node.js](./docs/install.md#node) -* [Install with Ruby](./docs/install.md#ruby) -* [Install with Homebrew](./docs/install.md#homebrew) -* [Install with Winget](./docs/install.md#winget) -* [Install for Debian-based Linux](./docs/install.md#deb) -* [Install for RPM-based Linux](./docs/install.md#rpm) -* [Install for Arch Linux](./docs/install.md#arch) -* [Usage](./docs/usage.md) -* [Configuration](./docs/configuration.md) +* [Install with Node.js][install-node] +* [Install with Ruby][install-ruby] +* [Install with Homebrew][install-brew] +* [Install with Winget][install-winget] +* [Install for Debian-based Linux][install-apt] +* [Install for RPM-based Linux][install-rpm] +* [Install for Arch Linux][install-arch] +* [Install for Alpine Linux][install-alpine] +* [Usage][usage] +* [Configuration][configuration] @@ -227,8 +232,8 @@ skip_output: ### Examples -* [Simple script](https://github.com/evilmartians/lefthook/tree/master/examples/with_scripts) -* [Full features](https://github.com/evilmartians/lefthook/tree/master/examples/complete) + +Check [examples][examples] @@ -249,4 +254,23 @@ skip_output: [documentation]: https://evilmartians.github.io/lefthook/ [configuration]: https://evilmartians.github.io/lefthook/configuration/index.html +[examples]: https://evilmartians.github.io/lefthook/examples/index.html [installation]: https://evilmartians.github.io/lefthook/installation/ +[usage]: https://evilmartians.github.io/lefthook/usage/index.html +[discussion]: https://github.com/evilmartians/lefthook/discussions +[install-apt]: https://evilmartians.github.io/lefthook/installation/deb.html +[install-ruby]: https://evilmartians.github.io/lefthook/installation/ruby.html +[install-node]: https://evilmartians.github.io/lefthook/installation/node.html +[install-brew]: https://evilmartians.github.io/lefthook/installation/homebrew.html +[install-winget]: https://evilmartians.github.io/lefthook/installation/winget.html +[install-rpm]: https://evilmartians.github.io/lefthook/installation/rpm.html +[install-arch]: https://evilmartians.github.io/lefthook/installation/arch.html +[install-alpine]: https://evilmartians.github.io/lefthook/installation/alpine.html +[config-parallel]: https://evilmartians.github.io/lefthook/configuration/parallel.html +[config-files]: https://evilmartians.github.io/lefthook/configuration/files.html +[config-glob]: https://evilmartians.github.io/lefthook/configuration/glob.html +[config-run]: https://evilmartians.github.io/lefthook/configuration/run.html +[config-scripts]: https://evilmartians.github.io/lefthook/configuration/Scripts.html +[config-tags]: https://evilmartians.github.io/lefthook/configuration/tags.html +[config-skip_output]: https://evilmartians.github.io/lefthook/configuration/skip_output.html +[usage-local-config]: https://evilmartians.github.io/lefthook/usage/tips.html#local-config