robin/maivi

a tiny cute lua web framework

git clone https://git.robinwobin.dev/robin/maivi

robindata: mark as in developmentbb4e822

push-srxvuswpkqxx
933 B37 linesraw

maivi uses a few important directories.

lua/

this directory is used for your templates. the lua/init.lua file is used to initialize the site. this file defines maivi's routes and can pre-process data files.

for now lets create a simple site that creates a route at the route of our site that uses a page component we'll create later.

-- maivi.router:add takes the url path (`/`) as
-- an argument together with a component and
-- a table with extra properties for this route
maivi.router:add("/", page, { gleeb = "gloob" })

static/

files inside this directory are statically served on /.

data/

this file contains content files and frequently markup files. files in this directory are scanned for frontmatter and passed to lua.

the syntax for the frontmatter uses a simplified version of toml:

+++
title = "meow"
desc = "wiwiwi wawawa"
date = 2026-03-31
tags = im,very,hungy
+++
1maivi uses a few important directories.
2
3### `lua/`
4
5this directory is used for your templates. the `lua/init.lua`
6file is used to initialize the site. this file defines maivi's routes and can
7pre-process data files.
8
9for now lets create a simple site that creates a route at the route of our
10site that uses a page component we'll create later.
11
12```lua
13-- maivi.router:add takes the url path (`/`) as
14-- an argument together with a component and
15-- a table with extra properties for this route
16maivi.router:add("/", page, { gleeb = "gloob" })
17```
18
19### `static/`
20
21files inside this directory are statically served on `/`.
22
23### `data/`
24
25this file contains content files and frequently markup files.
26files in this directory are scanned for frontmatter and passed to lua.
27
28the syntax for the frontmatter uses a simplified version of toml:
29
30```toml
31+++
32title = "meow"
33desc = "wiwiwi wawawa"
34date = 2026-03-31
35tags = im,very,hungy
36+++
37```