site generator 3
Find a file
2025-06-08 17:31:03 -07:00
framework more organize 2025-06-08 17:31:03 -07:00
src more organize 2025-06-08 17:31:03 -07:00
.gitignore i accidentally deleted the repo, but recovered it. i'll start committing 2025-06-06 23:38:02 -07:00
deno.jsonc add content type library 2025-06-08 12:38:25 -07:00
package-lock.json more organize 2025-06-08 17:31:03 -07:00
package.json more organize 2025-06-08 17:31:03 -07:00
readme.md more organize 2025-06-08 17:31:03 -07:00
repl.js primative backend support 2025-06-08 15:12:04 -07:00
run.js primative backend support 2025-06-08 15:12:04 -07:00
tsconfig.json fix all type errors 2025-06-07 17:01:34 -07:00

clover sitegen framework

this repository contains clover's "sitegen" framework, which is a set of tools that assist building websites. these tools power https://paperclover.net.

  • HTML "Server Side Rendering") engine written from scratch.
    • A more practical JSX runtime (class instead of className, etc).
    • Transparent integration with Marko to mix component types.
    • MDX support for text-heavy content pages.
  • Incremental static site generator and build system
    • Build entire production site at start, incremental updates when pages change; Build system state survives coding sessions.
    • The only difference in development and production mode is hidden source-maps and stripped assertions and console.debug calls. The site you see locally is the site you see deployed.
  • Tools for building complex, content heavy web sites.
    • Static asset serving with ETag and build-time compression.
    • Dynamic server side rendering from within backend code.
    • Databases with a typed SQLite wrapper.
  • Built on the battle-tested Node.js runtime. Partial support for Deno and Bun.

Included is src, which contains paperclover.net. Website highlights:

Development

npm install

# production generation
node run generate

# live development environment
node repl

repl.js will open a read-eval-print-loop where plugin state is cached (on my 2014 dev laptop, startup time is 600-1000ms). every file in framework and src besides hot.ts can be edited and quickly re-run. for example, to run framework/generate.ts, you can type "generate" into the shell. since top-level await is not supported (plugins are built on require as Node has poor module support), CLIs can include a main function, which is executed when the REPL runs it.

TODO: in the future, the repl will have a "dev" command which will do the incremental site build + host, possibly immediatly on opening the repl.

Contributions

No contributions to src accepted, only framework.