github.com/kata-containers/tests@v0.0.0-20240307153542-772105b56064/cmd/check-markdown/README.md (about) 1 # Overview 2 3 The Kata Project comprises 4 [a number of GitHub repositories](https://github.com/kata-containers). 5 All these repositories contain documents written in 6 [GitHub-Flavoured Markdown](https://github.github.com/gfm) 7 format. 8 9 [Linking in documents is strongly encouraged](https://github.com/kata-containers/kata-containers/blob/main/docs/Documentation-Requirements.md) 10 but due to the number of internal and external document links, it is easy for 11 mistakes to be made. Also, links can become stale when one document is updated 12 but the documents it depends on are not. 13 14 # Tool summary 15 16 The `kata-check-markdown` tool checks a markdown document to ensure all links 17 within it are valid. All internal links are checked and by default all 18 external links are also checked. The tool is able to suggest corrections for 19 some errors it finds. It can also generate a TOC (table of contents). 20 21 # Usage 22 23 ## Basic 24 25 ```sh 26 $ kata-check-markdown check README.md 27 ``` 28 29 ## Generate a TOC 30 31 ```sh 32 $ kata-check-markdown toc README.md 33 ``` 34 35 ## List headings 36 37 To list the document headings in the default `text` format: 38 39 ```sh 40 $ kata-check-markdown list headings README.md 41 ``` 42 43 ## List links 44 45 To list the links in a document in tab-separated format: 46 47 ```sh 48 $ kata-check-markdown list links --format tsv README.md 49 ``` 50 51 ## Full details 52 53 Lists all available options: 54 55 ```sh 56 $ kata-check-markdown -h 57 ```