changeset 294:f51b69ad09ae

docs: Add the ability to use Pygments highlighting.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 08 Mar 2015 22:58:58 -0700
parents d013cc191922
children 33903b1705a7
files docs/templates/default.html docs/templates/doc.html
diffstat 2 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/docs/templates/default.html	Sun Mar 08 22:58:28 2015 -0700
+++ b/docs/templates/default.html	Sun Mar 08 22:58:58 2015 -0700
@@ -14,6 +14,7 @@
     <!--[if lt IE 9]>
     <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
     <![endif]-->
+    {% block head %}{% endblock %}
 </head>
 <body data-spy="scroll">
     <div id="wrapper">
--- a/docs/templates/doc.html	Sun Mar 08 22:58:28 2015 -0700
+++ b/docs/templates/doc.html	Sun Mar 08 22:58:58 2015 -0700
@@ -1,5 +1,13 @@
 {% extends "default.html" %}
 
+{% block head %}
+{% if page.needs_pygments %}
+    <style type="text/css">
+    {{highlight_css()}}
+    </style>
+{% endif %}
+{% endblock %}
+
 {% block header %}
 <header class="documentation">
     <h1>{{ page.title }}</h1>