summaryrefslogtreecommitdiffstats
path: root/doc/developer/conf.py
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2018-04-09 22:18:05 +0200
committerQuentin Young <qlyoung@cumulusnetworks.com>2018-04-09 23:30:53 +0200
commitd5403d4f400db4b4d040460b3c95bdf804350344 (patch)
tree672f8a4438233f0338ef555a228fef5e6b809b64 /doc/developer/conf.py
parentdoc: stylin' (diff)
downloadfrr-d5403d4f400db4b4d040460b3c95bdf804350344.tar.xz
frr-d5403d4f400db4b4d040460b3c95bdf804350344.zip
doc: add frr.conf syntax highlighting
Vincent Bernat has written a small Pygments lexer for IOS / Quagga config files that works just as well on FRR stuff. Pulled that into our docs with his blessing. Also changed the background color on our code blocks away from that kinda ugly green to gray, which looks way better with the syntax highlighting changes that are about to happen in the next commit. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'doc/developer/conf.py')
-rw-r--r--doc/developer/conf.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/developer/conf.py b/doc/developer/conf.py
index 9ae199181..eecce4e90 100644
--- a/doc/developer/conf.py
+++ b/doc/developer/conf.py
@@ -15,6 +15,8 @@
import sys
import os
import re
+import pygments
+from sphinx.highlighting import lexers
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
@@ -341,3 +343,6 @@ def setup(app):
app.add_object_type('clicmd', 'clicmd')
# css overrides for HTML theme
app.add_stylesheet('overrides.css')
+ # load FRR config lexer
+ frrlexer = pygments.lexers.load_lexer_from_file('../extra/frrlexer.py', lexername="FRRLexer")
+ lexers['frr'] = frrlexer