ssr-pipeline

Trace and modify Madoc TS server-side rendering for site and admin.

57|15|Updated Nov 28, 2018
One-click install
npx skills add https://github.com/digirati-co-uk/madoc-platform --skill ssr-pipeline
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ssr-pipeline
Source: https://github.com/digirati-co-uk/madoc-platform/tree/main/.agents/skills/ssr-pipeline
Command: npx skills add https://github.com/digirati-co-uk/madoc-platform --skill ssr-pipeline

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers trace, debug, and modify how Madoc's TypeScript services perform server-side rendering for both the public site and admin UI, ensuring SSR output is correctly injected into HTML templates and that dev-mode HMR wiring does not break SSR boot.

Core Features & Use Cases

  • Identifies key entry points and renderers used for site and admin SSR and where context.staticPage is wired.
  • Explains template token replacement for head and outlet and how html/body attributes from SSR are applied.
  • Covers redirect handling and the differences between development (inline Vite HMR preamble) and production template usage.
  • Use case: change the SSR output shape or add injected assets and verify that templates, redirects, and HMR loading behave correctly across environments.

Quick Start

Inspect the site frontend handler and site template, then trace a single request to show where the render result's head and body are injected and whether any redirect result is returned.

Frequently Asked Questions about ssr-pipeline

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How does server-side rendering work with Vite HMR in a TypeScript application?

Server-side rendering with Vite HMR in a TypeScript application injects an inline Vite HMR preamble during development to preserve hot module replacement, while production builds use standard template asset injection to avoid breaking SSR boot.

How do I replace template tokens for head and outlet in SSR output?

To replace template tokens for head and outlet in SSR output, trace the render result from the frontend handler and apply the returned head and body attributes directly into the corresponding HTML template injection points.

Why does my server-side rendering redirect return the wrong status code?

SSR redirects return wrong status codes when the render result type is not properly evaluated; returning redirects with appropriate status codes requires checking the result type before rendering the HTML template.

How do I apply HTML and body attributes from an SSR render result?

You apply HTML and body attributes from an SSR render result by extracting them from the renderer output and injecting them into the root template elements to ensure the server-side rendered page reflects the correct attributes.

Can I modify Madoc TS server-side rendering for both site and admin UI?

Yes, you can modify Madoc TS server-side rendering for both site and admin UI by targeting the respective frontend handlers, HTML templates, and development HMR wiring where context.staticPage is wired.

What is the best way to debug SSR template token injection in Madoc TS?

The best way to debug SSR template token injection in Madoc TS is to inspect the site frontend handler and site template, then trace a single request to verify where the render result's head and body are injected.