Skip to content

feat(rendering)!: Rewrite ssg pipeline#12

Merged
lemyskaman merged 1 commit into
mainfrom
feat/reder-process
Jun 20, 2026
Merged

feat(rendering)!: Rewrite ssg pipeline#12
lemyskaman merged 1 commit into
mainfrom
feat/reder-process

Conversation

@lemyskaman

Copy link
Copy Markdown
Member

BREAKING CHANGE: replaces empty-shell SSG with fully-rendered HTML pipeline. All public routes now emit compiled Markdown + React component HTML at build time instead of empty

shells.

Changes:

  • New src/ssg/ module: RenderStrategy (interface), DefaultRenderStrategy, RenderPipeline, RenderContext, RenderHooks, SsgOptions, TemplateOverrides
  • RenderStrategy interface allows full pipeline replacement (DefaultRenderStrategy renders React via renderToString with compiled Markdown props)
  • Hook pipeline with five phases: beforeRender, transformMarkdown, transformHtml, afterRender, onError — all typed, ordered, async, with error recovery
  • Template system with built-in index.html.ejs + filesystem override convention (flatwave-templates/ at project root)
  • Markdown compiler (unified/remark/rehype) extracted to src/content/markdownCompiler.ts with compileMarkdownToHtml(markdown, options?) for reuse
  • Plugin option ssg: { enabled, strategy?, hooks?, template?, compileMarkdown? } with sensible defaults
  • Example app demonstrates transformMarkdown + transformHtml hooks
  • Output HTML now contains: compiled Markdown inside
    , SEO tags, analytics beacon injected via transformHtml hook
  • Removed dead code: empty src/ssg/ dir, inline renderRouteHtml/renderSitemap/ renderRobotsTxt from index.ts, unused ContentMarkdownCompilerOptions alias, unused RenderStrategy.ts file
  • Fixed production bugs: nested
    in error fallbacks, double markdown compilation, transformHtml running on component output instead of final document, component-not-found swallowing all content (now graceful fallback to compiled markdown)
  • Version bumped to 1.0.0 (was 0.1.0)
  • All 82 OpenSpec tasks complete; npm run validate passes (format, lint, type-check, build, 11 tests)

BREAKING CHANGE: replaces empty-shell SSG with fully-rendered HTML pipeline.
All public routes now emit compiled Markdown + React component HTML at build
time instead of empty <div id="root"></div> shells.

Changes:
- New src/ssg/ module: RenderStrategy (interface), DefaultRenderStrategy,
  RenderPipeline, RenderContext, RenderHooks, SsgOptions, TemplateOverrides
- RenderStrategy interface allows full pipeline replacement (DefaultRenderStrategy
  renders React via renderToString with compiled Markdown props)
- Hook pipeline with five phases: beforeRender, transformMarkdown, transformHtml,
  afterRender, onError — all typed, ordered, async, with error recovery
- Template system with built-in index.html.ejs + filesystem override convention
  (flatwave-templates/ at project root)
- Markdown compiler (unified/remark/rehype) extracted to src/content/markdownCompiler.ts
  with compileMarkdownToHtml(markdown, options?) for reuse
- Plugin option ssg: { enabled, strategy?, hooks?, template?, compileMarkdown? }
  with sensible defaults
- Example app demonstrates transformMarkdown + transformHtml hooks
- Output HTML now contains: compiled Markdown inside <div id="root">, SEO tags,
  analytics beacon injected via transformHtml hook
- Removed dead code: empty src/ssg/ dir, inline renderRouteHtml/renderSitemap/
  renderRobotsTxt from index.ts, unused ContentMarkdownCompilerOptions alias,
  unused RenderStrategy.ts file
- Fixed production bugs: nested <div id="root"> in error fallbacks, double
  markdown compilation, transformHtml running on component output instead of
  final document, component-not-found swallowing all content (now graceful
  fallback to compiled markdown)
- Version bumped to 1.0.0 (was 0.1.0)
- All 82 OpenSpec tasks complete; npm run validate passes (format, lint,
  type-check, build, 11 tests)
@lemyskaman lemyskaman merged commit 625439f into main Jun 20, 2026
4 checks passed
@lemyskaman lemyskaman deleted the feat/reder-process branch June 20, 2026 15:40
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 2.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant