| 1 | # Generate libwebp Container Spec Docs from Text Source |
| 2 | |
| 3 | HTML generation requires [kramdown](https://kramdown.gettalong.org/), easily |
| 4 | installed as a [rubygem](https://rubygems.org/). Rubygems installation should |
| 5 | satisfy dependencies automatically. |
| 6 | |
| 7 | HTML generation can then be done from the project root: |
| 8 | |
| 9 | ```shell |
| 10 | $ kramdown doc/webp-container-spec.txt --template doc/template.html > \ |
| 11 | doc/output/webp-container-spec.html |
| 12 | ``` |
| 13 | |
| 14 | kramdown can optionally syntax highlight code blocks, using |
| 15 | [CodeRay](https://github.com/rubychan/coderay), a dependency of kramdown that |
| 16 | rubygems will install automatically. The following will apply inline CSS |
| 17 | styling; an external stylesheet is not needed. |
| 18 | |
| 19 | ```shell |
| 20 | $ kramdown doc/webp-lossless-bitstream-spec.txt --template \ |
| 21 | doc/template.html --coderay-css style --coderay-line-numbers ' ' \ |
| 22 | --coderay-default-lang c > \ |
| 23 | doc/output/webp-lossless-bitstream-spec.html |
| 24 | ``` |
| 25 | |
| 26 | Optimally, use kramdown 0.13.7 or newer if syntax highlighting desired. |