From 21b88f93237402ed6f285d05599f9ce87e65a4a0 Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Wed, 6 Oct 2021 21:53:26 +0700 Subject: [PATCH] highlight: add page (#6723) Co-authored-by: marchersimon <50295997+marchersimon@users.noreply.github.com> Co-authored-by: Axel Navarro --- pages/common/highlight.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 pages/common/highlight.md diff --git a/pages/common/highlight.md b/pages/common/highlight.md new file mode 100644 index 0000000000..60ae0ee4ec --- /dev/null +++ b/pages/common/highlight.md @@ -0,0 +1,24 @@ +# highlight + +> Outputs syntax-highlighted source code to a variety of formats. +> More information: . + +- Produce a complete HTML document from a source code file: + +`highlight --out-format={{html}} --style {{theme_name}} --syntax {{language}} {{path/to/source_code}}` + +- Produce an HTML fragment, suitable for inclusion in a larger document: + +`highlight --out-format={{html}} --fragment --syntax {{language}} {{source_file}}` + +- Inline the CSS styling in every tag: + +`highlight --out-format={{html}} --inline-css --syntax {{language}} {{source_file}}` + +- List all supported languages, themes, or plugins: + +`highlight --list-scripts {{langs|themes|plugins}}` + +- Print a CSS stylesheet for a theme: + +`highlight --out-format={{html}} --print-style --style {{theme_name}} --syntax {{language}}] --stdout`