new-site/scripts/inject_healthcare_nav.py
justin bd9a70607f fix: maintain Services dropdown header from one canonical source
The site header / Services mega-dropdown was duplicated across two render
systems (Astro pages via Base.astro->nav.html, and ~80 pre-rendered static
public/**/index.html pages each embedding their own copy). They had drifted
into 5 different variants (missing 'New Carrier Setup', misplaced Healthcare
column, NEW vs FREE badges, em-dash encoding differences), so
dev.performancewest.net, the order pages, and the rest of the site disagreed.

- Make site/src/partials/nav.html the single source of truth (adopts the most
  complete variant).
- Add scripts/sync_nav.py to rewrite every static page's <nav> block from
  nav.html (idempotent; --check guards against drift in CI/deploy).
- Run the sync automatically in deploy.sh and scripts/deploy-dev.sh.
- Deprecate scripts/inject_healthcare_nav.py (now delegates to sync_nav.py).
- Neutralize the broken no-op SiteNav.astro component.

All 80 headers + the Astro-built order pages now render the identical dropdown.
2026-06-05 14:27:24 -05:00

21 lines
842 B
Python

#!/usr/bin/env python3
"""DEPRECATED -- superseded by scripts/sync_nav.py.
Historically this script injected just the Healthcare column into the static
pages, which caused the Services dropdown to drift (different sectors / badges /
ordering on different pages). The header is now maintained in ONE place
(site/src/partials/nav.html) and synced wholesale into every static page by
scripts/sync_nav.py.
This shim simply delegates to sync_nav.py so any existing automation that still
calls inject_healthcare_nav.py keeps working.
"""
import runpy
import sys
from pathlib import Path
if __name__ == "__main__":
print("inject_healthcare_nav.py is deprecated; delegating to sync_nav.py", file=sys.stderr)
target = Path(__file__).with_name("sync_nav.py")
sys.argv = [str(target)]
runpy.run_path(str(target), run_name="__main__")