Sebastian Wiesner avatar Sebastian Wiesner committed f6633ec

Closed issues are automatically struck through in HTML output

Comments (0)

Files changed (4)


 0.5 (in development)
+- Closed issues are automatically struck trough in HTML output
 - Require Sphinx 1.0 now
 - Fixed #2:  Installation on windows


 include README
 include LICENSE
 include CHANGES.*
+recursive-include sphinxcontrib *.css
 recursive-include doc *.rst *.py Makefile
 prune doc/_build


+.issue-closed {
+    text-decoration: line-through;
+.issue-closed:hover {
+    text-decoration: line-through underline;
+.issue-closed:visited {
+    text-decoration: line-through;


 import urllib
 from contextlib import closing
 from functools import partial
+from os import path
 from docutils import nodes
 from docutils.transforms import Transform
 from sphinx.addnodes import pending_xref
+from sphinx.util.osutil import copyfile
+from sphinx.util.console import bold
+def add_stylesheet(app):
+    app.add_stylesheet('issuetracker.css')
+def copy_stylesheet(app, exception):
+    if != 'html' or exception:
+        return
+'Copying issuetracker stylesheet... '), nonl=True)
+    dest = path.join(app.builder.outdir, '_static', 'issuetracker.css')
+    source = path.join(path.abspath(path.dirname(__file__)),
+                          'issuetracker.css')
+    copyfile(source, dest)
 def setup(app):
     app.add_config_value('issuetracker_user', None, 'env')
     app.add_config_value('issuetracker_project', None, 'env')
     app.add_config_value('issuetracker', None, 'env')
+    app.connect('builder-inited', add_stylesheet)
+    app.connect('build-finished', copy_stylesheet)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.