]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/book/src/development/infrastructure/book.md
Auto merge of #105650 - cassaundra:float-literal-suggestion, r=pnkfelix
[rust.git] / src / tools / clippy / book / src / development / infrastructure / book.md
1 # The Clippy Book
2
3 This document explains how to make additions and changes to the Clippy book, the
4 guide to Clippy that you're reading right now. The Clippy book is formatted with
5 [Markdown](https://www.markdownguide.org) and generated by
6 [mdBook](https://github.com/rust-lang/mdBook).
7
8 - [Get mdBook](#get-mdbook)
9 - [Make changes](#make-changes)
10
11 ## Get mdBook
12
13 While not strictly necessary since the book source is simply Markdown text
14 files, having mdBook locally will allow you to build, test and serve the book
15 locally to view changes before you commit them to the repository. You likely
16 already have `cargo` installed, so the easiest option is to simply:
17
18 ```shell
19 cargo install mdbook
20 ```
21
22 See the mdBook [installation](https://github.com/rust-lang/mdBook#installation)
23 instructions for other options.
24
25 ## Make changes
26
27 The book's
28 [src](https://github.com/rust-lang/rust-clippy/tree/master/book/src)
29 directory contains all of the markdown files used to generate the book. If you
30 want to see your changes in real time, you can use the mdBook `serve` command to
31 run a web server locally that will automatically update changes as they are
32 made. From the top level of your `rust-clippy` directory:
33
34 ```shell
35 mdbook serve book --open
36 ```
37
38 Then navigate to `http://localhost:3000` to see the generated book. While the
39 server is running, changes you make will automatically be updated.
40
41 For more information, see the mdBook
42 [guide](https://rust-lang.github.io/mdBook/).