Skip to content

Latest commit

 

History

History
48 lines (25 loc) · 1.67 KB

README.md

File metadata and controls

48 lines (25 loc) · 1.67 KB

Mastro

A minimal take on an Astro-like MPA web framework.

🚧 While the Mastro server framework is still a work in progress, the client-side part is already very usable: see Reactive Mastro.

Philosophy

  • No magic. Easy to understand codebase using simple JS functions wherever possible. Favour small, composable functions.

  • Zero client-side JavaScript by default.

  • No build step or bundler by default.

  • Minimal dependencies (see deno.json)

  • File-based routing: routes/ contains files with handler functions and that's the only way. No .md files with layout frontmatter property, no .astro-like-frontmatter-magic, no .html files, etc.

  • JSON and HTML route handlers are uniform. A handler takes a Request object (and no props, and hopefully no context).

  • Server components are simple JS functions that by convention take a props object.

  • For client-side components, see Reactive Mastro.

How to run

cd examples/blog/

Start dev server:

deno run start

Generate static site:

deno run generate

TODOs

  • Fully implement src/generate.ts (SSG) and src/server.ts (dev and maybe also prod server)

  • publish as package or packages

  • Asset handling (on server startup / static site generation?)

  • docs