URL restructure, 404 page, trailing slash normalization, layout fixes
- Rename /reactive-islands/ → /reactive/, /reference/ → /hypermedia/reference/, /examples/ → /hypermedia/examples/ across all .sx and .py files - Add 404 error page (not-found.sx) working on both server refresh and client-side SX navigation via orchestration.sx error response handling - Add trailing slash redirect (GET only, excludes /api/, /static/, /internal/) - Remove blue sky-500 header bar from SX docs layout (conditional on header-rows) - Fix 405 on API endpoints from trailing slash redirect hitting POST/PUT/DELETE - Fix client-side 404: orchestration.sx now swaps error response content instead of silently dropping it - Add new plan files and home page component Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -43,18 +43,24 @@
|
||||
;; Reference section
|
||||
;; ---------------------------------------------------------------------------
|
||||
|
||||
(defpage reference-index
|
||||
:path "/reference/"
|
||||
(defpage hypermedia-index
|
||||
:path "/hypermedia/"
|
||||
:auth :public
|
||||
:layout :sx-docs
|
||||
:content (~sx-doc :path "/reference/" (~reference-index-content)))
|
||||
:content (~sx-doc :path "/hypermedia/"))
|
||||
|
||||
(defpage reference-index
|
||||
:path "/hypermedia/reference/"
|
||||
:auth :public
|
||||
:layout :sx-docs
|
||||
:content (~sx-doc :path "/hypermedia/reference/" (~reference-index-content)))
|
||||
|
||||
(defpage reference-page
|
||||
:path "/reference/<slug>"
|
||||
:path "/hypermedia/reference/<slug>"
|
||||
:auth :public
|
||||
:layout :sx-docs
|
||||
:data (reference-data slug)
|
||||
:content (~sx-doc :path (str "/reference/" slug)
|
||||
:content (~sx-doc :path (str "/hypermedia/reference/" slug)
|
||||
(case slug
|
||||
"attributes" (~reference-attrs-content
|
||||
:req-table (~doc-attr-table-from-data :title "Request Attributes" :attrs req-attrs)
|
||||
@@ -77,11 +83,11 @@
|
||||
:uniq-table (~doc-attr-table-from-data :title "Unique to sx" :attrs uniq-attrs)))))
|
||||
|
||||
(defpage reference-attr-detail
|
||||
:path "/reference/attributes/<slug>"
|
||||
:path "/hypermedia/reference/attributes/<slug>"
|
||||
:auth :public
|
||||
:layout :sx-docs
|
||||
:data (attr-detail-data slug)
|
||||
:content (~sx-doc :path "/reference/attributes"
|
||||
:content (~sx-doc :path "/hypermedia/reference/attributes"
|
||||
(if attr-not-found
|
||||
(~reference-attr-not-found :slug slug)
|
||||
(~reference-attr-detail-content
|
||||
@@ -93,11 +99,11 @@
|
||||
:wire-placeholder-id attr-wire-id))))
|
||||
|
||||
(defpage reference-header-detail
|
||||
:path "/reference/headers/<slug>"
|
||||
:path "/hypermedia/reference/headers/<slug>"
|
||||
:auth :public
|
||||
:layout :sx-docs
|
||||
:data (header-detail-data slug)
|
||||
:content (~sx-doc :path "/reference/headers"
|
||||
:content (~sx-doc :path "/hypermedia/reference/headers"
|
||||
(if header-not-found
|
||||
(~reference-attr-not-found :slug slug)
|
||||
(~reference-header-detail-content
|
||||
@@ -108,11 +114,11 @@
|
||||
:demo header-demo))))
|
||||
|
||||
(defpage reference-event-detail
|
||||
:path "/reference/events/<slug>"
|
||||
:path "/hypermedia/reference/events/<slug>"
|
||||
:auth :public
|
||||
:layout :sx-docs
|
||||
:data (event-detail-data slug)
|
||||
:content (~sx-doc :path "/reference/events"
|
||||
:content (~sx-doc :path "/hypermedia/reference/events"
|
||||
(if event-not-found
|
||||
(~reference-attr-not-found :slug slug)
|
||||
(~reference-event-detail-content
|
||||
@@ -150,16 +156,16 @@
|
||||
;; ---------------------------------------------------------------------------
|
||||
|
||||
(defpage examples-index
|
||||
:path "/examples/"
|
||||
:path "/hypermedia/examples/"
|
||||
:auth :public
|
||||
:layout :sx-docs
|
||||
:content (~sx-doc :path "/examples/"))
|
||||
:content (~sx-doc :path "/hypermedia/examples/"))
|
||||
|
||||
(defpage examples-page
|
||||
:path "/examples/<slug>"
|
||||
:path "/hypermedia/examples/<slug>"
|
||||
:auth :public
|
||||
:layout :sx-docs
|
||||
:content (~sx-doc :path (str "/examples/" slug)
|
||||
:content (~sx-doc :path (str "/hypermedia/examples/" slug)
|
||||
(case slug
|
||||
"click-to-load" (~example-click-to-load)
|
||||
"form-submission" (~example-form-submission)
|
||||
@@ -519,6 +525,8 @@
|
||||
"sx-proxy" (~plan-sx-proxy-content)
|
||||
"async-eval-convergence" (~plan-async-eval-convergence-content)
|
||||
"wasm-bytecode-vm" (~plan-wasm-bytecode-vm-content)
|
||||
"generative-sx" (~plan-generative-sx-content)
|
||||
"art-dag-sx" (~plan-art-dag-sx-content)
|
||||
:else (~plans-index-content))))
|
||||
|
||||
;; ---------------------------------------------------------------------------
|
||||
@@ -526,16 +534,16 @@
|
||||
;; ---------------------------------------------------------------------------
|
||||
|
||||
(defpage reactive-islands-index
|
||||
:path "/reactive-islands/"
|
||||
:path "/reactive/"
|
||||
:auth :public
|
||||
:layout :sx-docs
|
||||
:content (~sx-doc :path "/reactive-islands/" (~reactive-islands-index-content)))
|
||||
:content (~sx-doc :path "/reactive/" (~reactive-islands-index-content)))
|
||||
|
||||
(defpage reactive-islands-page
|
||||
:path "/reactive-islands/<slug>"
|
||||
:path "/reactive/<slug>"
|
||||
:auth :public
|
||||
:layout :sx-docs
|
||||
:content (~sx-doc :path (str "/reactive-islands/" slug)
|
||||
:content (~sx-doc :path (str "/reactive/" slug)
|
||||
(case slug
|
||||
"demo" (~reactive-islands-demo-content)
|
||||
"event-bridge" (~reactive-islands-event-bridge-content)
|
||||
|
||||
@@ -171,17 +171,17 @@ def _reference_data(slug: str) -> dict:
|
||||
return {
|
||||
"req-attrs": [
|
||||
{"name": a, "desc": d, "exists": e,
|
||||
"href": f"/reference/attributes/{a}" if e and a in ATTR_DETAILS else None}
|
||||
"href": f"/hypermedia/reference/attributes/{a}" if e and a in ATTR_DETAILS else None}
|
||||
for a, d, e in REQUEST_ATTRS
|
||||
],
|
||||
"beh-attrs": [
|
||||
{"name": a, "desc": d, "exists": e,
|
||||
"href": f"/reference/attributes/{a}" if e and a in ATTR_DETAILS else None}
|
||||
"href": f"/hypermedia/reference/attributes/{a}" if e and a in ATTR_DETAILS else None}
|
||||
for a, d, e in BEHAVIOR_ATTRS
|
||||
],
|
||||
"uniq-attrs": [
|
||||
{"name": a, "desc": d, "exists": e,
|
||||
"href": f"/reference/attributes/{a}" if e and a in ATTR_DETAILS else None}
|
||||
"href": f"/hypermedia/reference/attributes/{a}" if e and a in ATTR_DETAILS else None}
|
||||
for a, d, e in SX_UNIQUE_ATTRS
|
||||
],
|
||||
}
|
||||
@@ -189,12 +189,12 @@ def _reference_data(slug: str) -> dict:
|
||||
return {
|
||||
"req-headers": [
|
||||
{"name": n, "value": v, "desc": d,
|
||||
"href": f"/reference/headers/{n}" if n in HEADER_DETAILS else None}
|
||||
"href": f"/hypermedia/reference/headers/{n}" if n in HEADER_DETAILS else None}
|
||||
for n, v, d in REQUEST_HEADERS
|
||||
],
|
||||
"resp-headers": [
|
||||
{"name": n, "value": v, "desc": d,
|
||||
"href": f"/reference/headers/{n}" if n in HEADER_DETAILS else None}
|
||||
"href": f"/hypermedia/reference/headers/{n}" if n in HEADER_DETAILS else None}
|
||||
for n, v, d in RESPONSE_HEADERS
|
||||
],
|
||||
}
|
||||
@@ -203,7 +203,7 @@ def _reference_data(slug: str) -> dict:
|
||||
return {
|
||||
"events-list": [
|
||||
{"name": n, "desc": d,
|
||||
"href": f"/reference/events/{n}" if n in EVENT_DETAILS else None}
|
||||
"href": f"/hypermedia/reference/events/{n}" if n in EVENT_DETAILS else None}
|
||||
for n, d in EVENTS
|
||||
],
|
||||
}
|
||||
@@ -218,17 +218,17 @@ def _reference_data(slug: str) -> dict:
|
||||
return {
|
||||
"req-attrs": [
|
||||
{"name": a, "desc": d, "exists": e,
|
||||
"href": f"/reference/attributes/{a}" if e and a in ATTR_DETAILS else None}
|
||||
"href": f"/hypermedia/reference/attributes/{a}" if e and a in ATTR_DETAILS else None}
|
||||
for a, d, e in REQUEST_ATTRS
|
||||
],
|
||||
"beh-attrs": [
|
||||
{"name": a, "desc": d, "exists": e,
|
||||
"href": f"/reference/attributes/{a}" if e and a in ATTR_DETAILS else None}
|
||||
"href": f"/hypermedia/reference/attributes/{a}" if e and a in ATTR_DETAILS else None}
|
||||
for a, d, e in BEHAVIOR_ATTRS
|
||||
],
|
||||
"uniq-attrs": [
|
||||
{"name": a, "desc": d, "exists": e,
|
||||
"href": f"/reference/attributes/{a}" if e and a in ATTR_DETAILS else None}
|
||||
"href": f"/hypermedia/reference/attributes/{a}" if e and a in ATTR_DETAILS else None}
|
||||
for a, d, e in SX_UNIQUE_ATTRS
|
||||
],
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user