New public-facing service documenting the s-expression rendering engine. Modelled on four.htmx.org with violet theme, all content rendered via sx. Sections: docs, reference, protocols, examples (live demos), essays (including "sx sucks"). No database — purely static documentation. Port 8012, Redis DB 10. CI and deploy.sh updated with app_dir() mapping for sx_docs -> sx/ directory. Caddy reverse proxy entry added separately. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
46 lines
1.1 KiB
Python
46 lines
1.1 KiB
Python
from __future__ import annotations
|
|
import path_setup # noqa: F401
|
|
import sxc.sx_components as sx_components # noqa: F401
|
|
|
|
from shared.infrastructure.factory import create_base_app
|
|
from shared.sx.jinja_bridge import render
|
|
|
|
from bp import register_pages
|
|
from services import register_domain_services
|
|
|
|
|
|
async def sx_docs_context() -> dict:
|
|
"""SX docs app context processor — minimal, no cross-service fragments."""
|
|
from shared.infrastructure.context import base_context
|
|
|
|
ctx = await base_context()
|
|
ctx["menu_items"] = []
|
|
blog_url = ctx.get("blog_url", "")
|
|
if callable(blog_url):
|
|
blog_url_str = blog_url("")
|
|
else:
|
|
blog_url_str = str(blog_url or "")
|
|
ctx["cart_mini"] = render(
|
|
"cart-mini", cart_count=0, blog_url=blog_url_str, cart_url="",
|
|
)
|
|
ctx["auth_menu"] = ""
|
|
ctx["nav_tree"] = ""
|
|
return ctx
|
|
|
|
|
|
def create_app() -> "Quart":
|
|
app = create_base_app(
|
|
"sx",
|
|
context_fn=sx_docs_context,
|
|
domain_services_fn=register_domain_services,
|
|
)
|
|
|
|
import sxc.sx_components # noqa: F401
|
|
|
|
app.register_blueprint(register_pages(url_prefix="/"))
|
|
|
|
return app
|
|
|
|
|
|
app = create_app()
|