1
0

saltrepo.py 533 B

123456789101112131415161718192021222324
  1. # -*- coding: utf-8 -*-
  2. '''
  3. saltrepo
  4. ~~~~~~~~
  5. SaltStack Repository Sphinx directives
  6. '''
  7. def source_read_handler(app, docname, source):
  8. if '|repo_primary_branch|' in source[0]:
  9. source[0] = source[0].replace(
  10. '|repo_primary_branch|',
  11. app.config.html_context['repo_primary_branch']
  12. )
  13. def setup(app):
  14. app.connect('source-read', source_read_handler)
  15. return {
  16. 'version': 'builtin',
  17. 'parallel_read_safe': True,
  18. 'parallel_write_safe': True,
  19. }