FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit bf7614f0 authored by Nick Brown's avatar Nick Brown
Browse files

fix: Remove broken rel_url utility, replace with new 'site:' syntax

parent 1b30c1d2
No related branches found
No related tags found
1 merge request!453feat: Knowledge base enhancements (diataxis)
Pipeline #714106 passed
......@@ -10,7 +10,6 @@ from ..constants import (
TEAMS_PAGE_URI,
SERVICES_PAGE_URI,
)
from ..utils import rel_url
def _person_label_link(person: dict) -> str:
"""
......@@ -29,7 +28,8 @@ def _team_label_link(env: MacrosPlugin, team: Team, use_email: bool=False) -> st
if use_email:
return team.email, mailto(team.email)
else:
destination = rel_url(env, TEAMS_PAGE_URI) + "/#" + team.title.lower().replace(" ", "-")
rel_url = f"site:{TEAMS_PAGE_URI}"
destination = rel_url + "/#" + team.title.lower().replace(" ", "-")
return team.title, destination
def _service_label_link(env: MacrosPlugin, service_key: str, service: Service):
......@@ -38,7 +38,7 @@ def _service_label_link(env: MacrosPlugin, service_key: str, service: Service):
str:
HTML hyperlink to Guidebook service page.
"""
return service.title, rel_url(env, f"{SERVICES_PAGE_URI}/{service_key}")
return service.title, f"site:{SERVICES_PAGE_URI}/{service_key}"
def _person_key_label(service_key: str) -> str:
"""
......@@ -144,7 +144,7 @@ def service_management(env: MacrosPlugin, service: Service) -> str:
return "\n\n".join(lines)
def all_teams_services(env) -> str:
def all_teams_services(env: MacrosPlugin) -> str:
"""
Returns:
str:
......@@ -184,7 +184,7 @@ def all_teams_services(env) -> str:
return "\n\n".join(sections)
def tabbed_services_view(env) -> str:
def tabbed_services_view(env: MacrosPlugin) -> str:
sections = []
indent = " " * 4
......
......@@ -25,11 +25,6 @@ def variables(env: MacrosPlugin) -> dict:
"""
return environment(env).get("variables", {})
def rel_url(env: MacrosPlugin, rel_path: str) -> str:
_env = environment(env)
site_url = _env["conf"]["site_url"]
return f"{site_url}/{rel_path}"
# Generic Macros:
_ENV = None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment