From 038a0ee160e16622074406dbaf282ab55707d454 Mon Sep 17 00:00:00 2001 From: Valentin Kiselev Date: Tue, 21 Jan 2025 10:41:44 +0300 Subject: [PATCH] docs: update the intro page (#938) --- README.md | 6 ++---- docs/mdbook/favicon.svg | 1 + docs/mdbook/intro.md | 35 +++++++++++++++++++++++++++++------ 3 files changed, 32 insertions(+), 10 deletions(-) create mode 100755 docs/mdbook/favicon.svg diff --git a/README.md b/README.md index 10fa0e52..61a27df8 100644 --- a/README.md +++ b/README.md @@ -15,12 +15,10 @@ A Git hooks manager for Node.js, Ruby, Python and many other types of projects. * **Powerful.** It allows to control execution and files you pass to your commands. * **Simple.** It is single dependency-free binary which can work in any environment. -📖 [Read the introduction post](https://evilmartians.com/chronicles/lefthook-knock-your-teams-code-back-into-shape?utm_source=lefthook) - -📖 [Read the documentation][documentation] +📖 [Introduction post](https://evilmartians.com/chronicles/lefthook-knock-your-teams-code-back-into-shape?utm_source=lefthook) -Sponsored by Evil Martians +Sponsored by Evil Martians ## Install diff --git a/docs/mdbook/favicon.svg b/docs/mdbook/favicon.svg new file mode 100755 index 00000000..75c367b8 --- /dev/null +++ b/docs/mdbook/favicon.svg @@ -0,0 +1 @@ + diff --git a/docs/mdbook/intro.md b/docs/mdbook/intro.md index d7bc59e0..49289fc1 100644 --- a/docs/mdbook/intro.md +++ b/docs/mdbook/intro.md @@ -1,21 +1,44 @@ # Introduction + + **Lefthook** is a Git hooks manager. This documentation provides the reference for installing, configuring and using the lefthook. -Maybe you are looking for -- **[Installation instructions](./installation)** to install lefthook to your system or just project. +- **[Installation instructions](./installation)** to install lefthook to your OS or project. - **[Examples](./examples)** of lefthook common usage. -- **[Configuration](./configuration)** with details explanation of lefthook options. +- **[Configuration](./configuration)** with detailed explanation of lefthook options. + + +**Example:** Run your linters on `pre-commit` hook and forget about the routine. + +```yml +# lefthook.yml + +pre-commit: + parallel: true + jobs: + - run: yarn run stylelint --fix {staged_files} + glob: "*.css" + stage_fixed: true + + - run: yarn run eslint --fix "{staged_files}" + glob: + - "*.ts" + - "*.js" + - "*.tsx" + - "*.jsx" + stage_fixed: true +``` --- -Sponsored by Evil Martians - +Sponsored by Evil Martians -❓If you have a question or found a mistake in the documentation, please create a new [discussion](https://github.com/evilmartians/lefthook/discussions/new/choose). Small contributions help maintaining the quality of the project. +❓_If you have a question or found a mistake in the documentation, please create a new [discussion](https://github.com/evilmartians/lefthook/discussions/new/choose). Small contributions help maintaining the quality of the project._