1
0

saltrepo.py 522 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|", app.config.html_context["repo_primary_branch"]
  11. )
  12. def setup(app):
  13. app.connect("source-read", source_read_handler)
  14. return {
  15. "version": "builtin",
  16. "parallel_read_safe": True,
  17. "parallel_write_safe": True,
  18. }