File: conf.py

package info (click to toggle)
sphinx 7.4.7-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 25,608 kB
  • sloc: python: 85,281; javascript: 6,139; perl: 451; makefile: 178; sh: 37; xml: 19; ansic: 2
file content (16 lines) | stat: -rw-r--r-- 372 bytes parent folder | download | duplicates (18)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from sphinx.writers.html import HTML5Translator

project = 'test'


class ConfHTMLTranslator(HTML5Translator):
    depart_with_node = 0

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


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