(path: str)
| 360 | |
| 361 | |
| 362 | def 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 | |
| 373 | def strip_frontmatter(text: str) -> str: |
no outgoing calls
no test coverage detected