Phase 5: Update all content paths to SX expression URLs

- Update ~sx-doc :path values in docs.sx from old-style paths to SX
  expression URLs (fixes client-side rendered page nav resolution)
- Fix stale hrefs in content/pages.py code examples
- Fix tabs push-url in examples.sx
- Add self-defining-medium + sx-urls + sx-protocol to essay/plan cases

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-12 16:39:13 +00:00
parent 9f2f4377b9
commit 7a1d1e9ea2
3 changed files with 64 additions and 60 deletions

View File

@@ -539,7 +539,7 @@ HEADER_DETAILS: dict[str, dict] = {
';; SX-Location: /docs/introduction\n'
';;\n'
';; With options:\n'
';; SX-Location: {"path": "/language/docs/intro", "target": "#sidebar", "swap": "innerHTML"}'
';; SX-Location: {"path": "/(language.(doc.intro))", "target": "#sidebar", "swap": "innerHTML"}'
),
},
"SX-Replace-Url": {
@@ -676,8 +676,8 @@ EVENT_DETAILS: dict[str, dict] = {
';; sx-boost containers try client routing first.\n'
';; On success, sx:clientRoute fires on the swap target.\n'
'(nav :sx-boost "#main-panel"\n'
' (a :href "/etc/essays/" "Essays")\n'
' (a :href "/etc/plans/" "Plans"))\n'
' (a :href "/(etc.(essay))" "Essays")\n'
' (a :href "/(etc.(plan))" "Plans"))\n'
'\n'
';; Listen in body.js:\n'
';; document.body.addEventListener("sx:clientRoute",\n'
@@ -983,8 +983,8 @@ ATTR_DETAILS: dict[str, dict] = {
),
"demo": "ref-pushurl-demo",
"example": (
'(a :href "/geography/hypermedia/reference/attributes/sx-get"\n'
' :sx-get "/geography/hypermedia/reference/attributes/sx-get"\n'
'(a :href "/(geography.(hypermedia.(reference-detail.attributes.sx-get)))"\n'
' :sx-get "/(geography.(hypermedia.(reference-detail.attributes.sx-get)))"\n'
' :sx-target "#main-panel"\n'
' :sx-select "#main-panel"\n'
' :sx-swap "outerHTML"\n'
@@ -1112,8 +1112,8 @@ ATTR_DETAILS: dict[str, dict] = {
),
"demo": "ref-media-demo",
"example": (
'(a :href "/geography/hypermedia/reference/attributes/sx-get"\n'
' :sx-get "/geography/hypermedia/reference/attributes/sx-get"\n'
'(a :href "/(geography.(hypermedia.(reference-detail.attributes.sx-get)))"\n'
' :sx-get "/(geography.(hypermedia.(reference-detail.attributes.sx-get)))"\n'
' :sx-target "#main-panel"\n'
' :sx-select "#main-panel"\n'
' :sx-swap "outerHTML"\n'
@@ -1221,9 +1221,9 @@ ATTR_DETAILS: dict[str, dict] = {
"example": (
';; Boost with configurable target\n'
'(nav :sx-boost "#main-panel"\n'
' (a :href "/language/docs/introduction" "Introduction")\n'
' (a :href "/language/docs/components" "Components")\n'
' (a :href "/language/docs/evaluator" "Evaluator"))\n'
' (a :href "/(language.(doc.introduction))" "Introduction")\n'
' (a :href "/(language.(doc.components))" "Components")\n'
' (a :href "/(language.(doc.evaluator))" "Evaluator"))\n'
'\n'
';; All links swap into #main-panel automatically.\n'
';; Pure pages render client-side (no server request).'