mirror of
https://github.com/wez/wezterm.git
synced 2024-11-22 04:56:12 +03:00
docs: fixup absolute link warning for {{since(nightly)}}
We can now compute a relative link instead
This commit is contained in:
parent
d701a8fcea
commit
0fd76a77c5
@ -10,12 +10,15 @@ def define_env(env):
|
|||||||
@env.macro
|
@env.macro
|
||||||
def since(vers, outline=False, inline=False):
|
def since(vers, outline=False, inline=False):
|
||||||
if vers == "nightly":
|
if vers == "nightly":
|
||||||
|
# Determine the relative path traversal to the root,
|
||||||
|
# so that we can emit the link to the install page
|
||||||
|
rel_root = "../" * (len(env.page.url.split('/')) - 1)
|
||||||
first_line = "*Since: Nightly Builds Only*"
|
first_line = "*Since: Nightly Builds Only*"
|
||||||
expanded = "+"
|
expanded = "+"
|
||||||
blurb = """
|
blurb = f"""
|
||||||
The functionality described in this section requires a nightly build of wezterm.
|
The functionality described in this section requires a nightly build of wezterm.
|
||||||
You can obtain a nightly build by following the instructions from the
|
You can obtain a nightly build by following the instructions from the
|
||||||
[Download](/wezterm/installation.html) section.
|
[Download]({rel_root}installation.md) section.
|
||||||
"""
|
"""
|
||||||
else:
|
else:
|
||||||
first_line = f"*Since: Version {vers}*"
|
first_line = f"*Since: Version {vers}*"
|
||||||
|
Loading…
Reference in New Issue
Block a user