MCPcopy Create free account
hub / github.com/DevCloudNinjas/DevOps-Projects / site_path

Function site_path

tools/build_starlight_content.py:362–370  ·  view source on GitHub ↗
(path: str)

Source from the content-addressed store, hash-verified

360
361
362def site_path(path: str) -> str:
363 if path.startswith(("http://", "https://", "mailto:", "tel:", "#")):
364 return path
365 normalized = path if path.startswith("/") else f"/{path}"
366 if SITE_BASE == "/":
367 return normalized
368 if normalized == SITE_BASE or normalized.startswith(f"{SITE_BASE}/"):
369 return normalized
370 return f"{SITE_BASE}{normalized}"
371
372
373def strip_frontmatter(text: str) -> str:

Callers 12

project_mapsFunction · 0.85
replaceFunction · 0.85
tag_hrefFunction · 0.85
write_homepageFunction · 0.85
start_route_cardFunction · 0.85
hero_route_linkFunction · 0.85
project_pathFunction · 0.85
write_start_here_pageFunction · 0.85
tag_cardFunction · 0.85
write_tag_pagesFunction · 0.85
source_sectionFunction · 0.85
write_catalog_overridesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected