Skip to content

feature(cli): #1622 add support for getStaticPaths and getStaticParams#1675

Open
thescientist13 wants to merge 17 commits into
masterfrom
feat/issue-1622-get-static-paths-and-params
Open

feature(cli): #1622 add support for getStaticPaths and getStaticParams#1675
thescientist13 wants to merge 17 commits into
masterfrom
feat/issue-1622-get-static-paths-and-params

Conversation

@thescientist13

@thescientist13 thescientist13 commented Apr 25, 2026

Copy link
Copy Markdown
Member

Related Issue

resolve #1622

Documentation

  1. Document dynamic routing www.greenwoodjs.dev#261
    • not for API routes
    • works for getBody too
    • disclaimer: custom URL renderers have no support for this feature

Summary of Changes

  1. Add support for getStaticPaths / getStaticParams w/ types
  2. prerender refactoring to address issues with hybrid rendering
  3. Handle base path routing
  4. Add a handful of helper utilities and update plugins (this feature is a bit of a leaky abstraction of the router (maybe?), might want to refine this at some point)

TODO

  1. downstream testing - feat: #13 convert project to be SSG based AnalogStudiosRI/www.analogstudios.net#112
  2. getBody + tests
  3. confirm logging / build output for SSG pages
    • add tests for no JS output
  4. handle chore(workspace): upgrade chai esm #1685
  5. unexpected output - feat: #13 convert project to be SSG based AnalogStudiosRI/www.analogstudios.net#112 (comment)
  6. SSR page is getting emitted as HTML - feat: #13 convert project to be SSG based AnalogStudiosRI/www.analogstudios.net#112 (comment)
  7. validate against adapter plugins
    • create shared CLI filter function for dynamic routes
    • should not conflict / not emit anything for gSP usage
  8. apply to Lit SSR plugin - feature(plugins): #1646 support lit ssr default export for pages and layouts including dynamic routing #1647
  9. base path support / static router
  10. check to see if we need to prune bundles from being emitted
  11. check logging output for "generating static pages..."
  12. TODOs / refactor / clean up (bundle, prerender, serve command / lifecycle)
  13. docs tracking

Thoughts / Questions

  1. how to push into the graph? or just for routing? what about content collections? - tracked here - Dynamic Routing Enhancements #1692
  2. ambiguity around prerender behavior - deferred to support prerender during development #1249
  3. does Lit SSR plugin need prerender: false default setting? - no
  4. It would be interesting to see if we still want to support the source plugin after this, or if we should deprecate it? - tracked here Dynamic Routing Enhancements #1692
  5. should layouts / getLayout etc support this?
  6. types for SSR pages / API routes / getStaticPaths + getStaticProps (nice to have)

@thescientist13 thescientist13 added documentation Greenwood specific docs CLI SSR feature New feature or request Types(cript) Requires type definition or TypeScript related work / documentation labels Apr 25, 2026
@thescientist13 thescientist13 self-assigned this Apr 25, 2026
@thescientist13 thescientist13 added the question Further information is requested label Apr 25, 2026
@thescientist13 thescientist13 changed the title feature(cli): #1622 get static paths and static params feature(cli): #1622 add support for getStaticPaths and getStaticParams Apr 25, 2026
@thescientist13 thescientist13 force-pushed the feat/issue-1622-get-static-paths-and-params branch from 10cd097 to 07477f7 Compare May 28, 2026 01:16
@thescientist13 thescientist13 force-pushed the feat/issue-1622-get-static-paths-and-params branch from 07477f7 to 2ab1759 Compare June 7, 2026 19:34
@thescientist13 thescientist13 added Plugins Greenwood Plugins and removed question Further information is requested labels Jun 13, 2026
@thescientist13 thescientist13 added the Runtimes Tasks related to supporting runtimes like Deno, Bun, etc label Jun 20, 2026
@thescientist13 thescientist13 force-pushed the feat/issue-1622-get-static-paths-and-params branch from 13f60aa to 53e0bdc Compare June 20, 2026 23:17
@thescientist13 thescientist13 marked this pull request as ready for review June 21, 2026 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLI documentation Greenwood specific docs feature New feature or request Plugins Greenwood Plugins Runtimes Tasks related to supporting runtimes like Deno, Bun, etc SSR Types(cript) Requires type definition or TypeScript related work / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support pre-rendering (SSG) for dynamic routes

1 participant