diff options
| author | Ned Batchelder <ned@nedbatchelder.com> | 2010-08-21 11:54:16 -0400 |
|---|---|---|
| committer | Ned Batchelder <ned@nedbatchelder.com> | 2010-08-21 11:54:16 -0400 |
| commit | 3c239604f0315aaa17b0a3474133689847cdbe65 (patch) | |
| tree | 2bbcf7017d1e952f27ac837f7f59a88ebbab79aa /doc/_ext | |
| parent | 279846915261d7df506040b0ff48d93ffc3fa87d (diff) | |
| download | python-coveragepy-git-3c239604f0315aaa17b0a3474133689847cdbe65.tar.gz | |
Change how the beta docs are made, and make them more beta-y
Diffstat (limited to 'doc/_ext')
| -rw-r--r-- | doc/_ext/px_xlator.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/doc/_ext/px_xlator.py b/doc/_ext/px_xlator.py index dc61a3c2..9b57e458 100644 --- a/doc/_ext/px_xlator.py +++ b/doc/_ext/px_xlator.py @@ -42,6 +42,14 @@ class PxTranslator(BaseHtmlXlator): self.body.append("<what when='%s'>%s</what>\n" % (when, self.encode(what.strip())))
self.body.append("</history>\n")
+ if "beta" in self.builder.config.release:
+ self.body.append("""
+ <box>
+ These docs are for a beta release.
+ For the latest released version, see <a href='/code/coverage'>coverage.py</a>.
+ </box>
+ """)
+
def visit_field(self, node):
if node.children[0].astext() == 'history':
self.history.append(node.children[1].astext())
@@ -82,7 +90,10 @@ class PxBuilder(StandaloneHTMLBuilder): self.out_suffix = '.px'
self.link_suffix = '.html'
- self.px_uri = os.environ.get("COVERAGE_DOC_ROOT") or "/code/coverage/"
+ if "beta" in self.config.release:
+ self.px_uri = "/code/coverage/beta/"
+ else:
+ self.px_uri = "/code/coverage/"
def get_target_uri(self, docname, typ=None):
return self.px_uri + docname + self.link_suffix
|
