File: conf.py

package info (click to toggle)
sphinx 5.3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 22,912 kB
  • sloc: python: 75,824; javascript: 14,164; perl: 420; makefile: 180; sh: 57; xml: 19; ansic: 1
file content (16 lines) | stat: -rw-r--r-- 369 bytes parent folder | download | duplicates (19)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from sphinx.writers.html import HTMLTranslator

project = 'test'


class ConfHTMLTranslator(HTMLTranslator):
    depart_with_node = 0

    def depart_admonition(self, node=None):
        if node is not None:
            self.depart_with_node += 1
        HTMLTranslator.depart_admonition(self, node)


def setup(app):
    app.set_translator('html', ConfHTMLTranslator)