Skip to content

Commit

Permalink
Add sphinx domain merging
Browse files Browse the repository at this point in the history
Allows sphinx to use parallel building

Tested with: make SPHINXOPTS+="-W -j8" html
  • Loading branch information
slusarz authored and sirainen committed Jan 22, 2024
1 parent 7878f5f commit 60a94c5
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions source/_ext/dovecot_sphinx.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,15 @@ def generate(self, docnames=None):
return content, True


class DovecotSettingDomain(Domain):
class DovecotAbstractDomain(Domain):
initial_data = {}

def merge_domaindata(self, docnames, otherdata):
for k in list(self.initial_data.keys()):
self.data[k].update(otherdata[k])


class DovecotSettingDomain(DovecotAbstractDomain):
roles = {"ref": XRefRole()}
initial_data = {
"entry": {},
Expand Down Expand Up @@ -560,7 +568,7 @@ def transform_content(self, contentnode):
contentnode += collapse


class DovecotEventDomain(Domain):
class DovecotEventDomain(DovecotAbstractDomain):
name = "dovecot_event"

initial_data = {"global": {}, "group": {}, "inherit": {}}
Expand Down

0 comments on commit 60a94c5

Please sign in to comment.