site generator 3
Find a file
2025-07-08 20:48:30 -07:00
framework finish scan3 2025-07-08 20:48:30 -07:00
src finish scan3 2025-07-08 20:48:30 -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
flake.lock initial run of scan3 on sandwich 2025-07-07 09:42:04 -07:00
flake.nix finish scan3 2025-07-08 20:48:30 -07:00
package-lock.json move discovered ffmpeg presets 2025-07-03 01:22:59 -07:00
package.json move discovered ffmpeg presets 2025-07-03 01:22:59 -07:00
readme.md finish scan3 2025-07-08 20:48:30 -07:00
repl.js stuff for file view 2025-06-27 19:40:19 -07:00
run.js format 2025-07-07 20:58:02 -07:00
tsconfig.json file viewer work 2025-06-22 14:38:36 -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. (~500 lines)
    • A more practical JSX runtime (class instead of className, built-in clsx, html() helper over dangerouslySetInnerHTML prop, etc).
    • Integration with Marko for concisely written components.
    • TODO: MDX-like compiler for content-heavy pages like blogs.
    • Different languages can be used at the same time. Supports async function components, <Suspense />, and custom extensions.
  • 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 console.debug calls. The site you see locally is the same site you see deployed.
    • (TODO) Tests, Lints, and Type-checking is run alongside, and only re-runs checks when the files change. For example, changing a component re-tests only pages that use that component and re-lints only the changed file.
  • Integrated libraries for building complex, content heavy web sites.
    • Static asset serving with ETag and build-time compression.
    • Dynamicly rendered pages with static client. (#import "#sitegen/view")
    • Databases with a typed SQLite wrapper. (import "#sitegen/sqlite")
    • TODO: Meta and Open Graph generation. (export const meta)
    • TODO: Font subsetting tools to reduce bytes downloaded by fonts.
  • Built on the battle-tested Node.js runtime.

None of these tools are complex or revolutionary. Rather, this project is the sum of many years of experience on managing content heavy websites, and an example on how other over-complicate other frameworks.

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

Development

minimum system requirements:

  • a cpu with at least 1 core.
  • random access memory.
  • windows 7 or later, macos, or other operating system.

my development machine, for example, is Dell Inspiron 7348 with Core i7

npm install

# production generation
node run generate
node .clover/out/server

# "development" watch mode
node run watch

for unix systems, the provided flake.nix can be used with nix develop to open a shell with all needed system dependencies.

Contributions

No contributions to src accepted, only framework.