Ensure the ``:pep:`` role works properly with the dirhtml builder (#3322)
This commit is contained in:
parent
43a28ef8b4
commit
dbe0dd8c4f
|
@ -28,7 +28,7 @@ def _update_config_for_builder(app: Sphinx) -> None:
|
|||
app.env.document_ids = {} # For PEPReferenceRoleTitleText
|
||||
app.env.settings["builder"] = app.builder.name
|
||||
if app.builder.name == "dirhtml":
|
||||
app.env.settings["pep_url"] = "pep-{:0>4}"
|
||||
app.env.settings["pep_url"] = "pep-{:0>4}/"
|
||||
|
||||
app.connect("build-finished", _post_build) # Post-build tasks
|
||||
|
||||
|
|
|
@ -149,7 +149,7 @@ class PEPZeroWriter:
|
|||
target = (
|
||||
f"topic/{subindex}.html"
|
||||
if builder == "html"
|
||||
else f"../topic/{subindex}"
|
||||
else f"../topic/{subindex}/"
|
||||
)
|
||||
self.emit_text(f"* `{subindex.title()} PEPs <{target}>`_")
|
||||
self.emit_newline()
|
||||
|
|
Loading…
Reference in New Issue