diff options
author | Kristian Rother <krother@rubor.de> | 2016-06-06 09:57:34 +0200 |
---|---|---|
committer | Kristian Rother <krother@rubor.de> | 2016-06-06 09:57:34 +0200 |
commit | ffaa91d202a95294c6d2a3069ff1f4c3da25f410 (patch) | |
tree | a4d0138b70fb81189ed41d102a9fbc81d4f2696d /docs | |
parent | df340160e8ab1de914b3c97a730fc9a1a6dea158 (diff) | |
download | markdown-ffaa91d202a95294c6d2a3069ff1f4c3da25f410.tar.gz markdown-ffaa91d202a95294c6d2a3069ff1f4c3da25f410.tar.bz2 markdown-ffaa91d202a95294c6d2a3069ff1f4c3da25f410.zip |
added instructions for CodeHilite with Pygments
Improved the setup documentation when rendering Python code with Pygments and CodeHilite. Added a link to the Pygments CSS files and emphasized that not installing pygments does not cause an error message.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/extensions/code_hilite.txt | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/docs/extensions/code_hilite.txt b/docs/extensions/code_hilite.txt index 5e802b8..575ee48 100644 --- a/docs/extensions/code_hilite.txt +++ b/docs/extensions/code_hilite.txt @@ -20,20 +20,27 @@ This extension is included in the standard Markdown library. Setup ----- +### Step 1: download and install Pygments ### + You will also need to [download][dl] and install the Pygments package on your -`PYTHONPATH`. You will need to determine the appropriate CSS classes and create -appropriate rules for them, which are either defined in or linked from the -header of your HTML templates. See the excellent [documentation][] for more +`PYTHONPATH`. The CodeHilite extension will produce HTML output without Pygments, +but it won't highlight anything. + +[dl]: http://pygments.org/download/ + +### Step 2: add CSS classes ### + +You will need to determine the appropriate CSS classes and/or JavaScript with +appropriate rules. The CSS classes either need to be defined in or linked from +the header of your HTML templates. Ready-made [CSS files for Python][rich] are available. + +See the excellent [documentation][] for more details. If no language is defined, Pygments will attempt to guess the language. When that fails, the code block will not be highlighted. -[dl]: http://pygments.org/download/ +[rich]: https://github.com/richleland/pygments-css [documentation]: http://pygments.org/docs -!!! Note - The CSS and/or JavaScript is not included as part of this extension - but must be provided by the end user. The Pygments project provides - default CSS styles which you may find to be a useful starting point. Syntax ------ |