specs_generation.md (1036B)
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 \ 21 --template doc/template.html \ 22 -x syntax-coderay --syntax-highlighter coderay \ 23 --syntax-highlighter-opts "{default_lang: c, line_numbers: , css: style}" \ 24 > doc/output/webp-lossless-bitstream-spec.html 25 ``` 26 27 Optimally, use kramdown 0.13.7 or newer if syntax highlighting desired.