# Teapot because doll. it uses [markdoll](https://codeberg.org/0x57e11a/markdoll). ## Usage this is a nix package/flakey thing, the package outputs a normal directory/derivation so awawa it currently does not support non-flake, but could. ### step 1: make the nix package! basically, make a package that do this (there's like 8 ways to do this please be careful) ```nix brewTea { name = "doll site"; src = ./.; layoutSrc = ./layouts; defaultLayout = ./layouts/default.html; }; ``` ### step 2: make the default layout! here's a good `layouts/default.html` to start with.. ```html %%TITLE%%:doll %%HEAD%%
%%CONTENT%%
``` #### step 2a: what the %%%% do the layout engine knows three keywords: - `%%TITLE%%` which comes from either the filename (so `index.doll` -> `index`) or the frontmatter `title` key (what is a frontmatter? skip to **step 3a**) - `%%HEAD%%` which is filled in by the following frontmatter keys: - `description` becomes a meta:description tag - `tags` becomes a meta:keywords tag - `author` becomes a meta:author tag - `%%CONTENT%%` becomes the markdoll content ### step 3: make MARKDOLL!!!!! ok so lets just put something basic into `index.doll` ``` &hello everydolly! awawawawawa [img(https://codeberg.org/0x57e11a/markdoll/raw/branch/main/button.png):: alt text goes here (88x31 button that says MADE WITH MARKDOLL) ] ``` ### step 3a: make FRONTMATTER!! (this is a weird word dw about it its actually some cool stuff) so we can add some details aboput every markdoll file,, lets add everything we support!! ``` --- title: doll!!! points! description: dolldolldolldolldolldolldolldoll tags: no witches allowed, maybe if She brings tea tho author: aki.41666 layout: default.html --- &hello everydolly! awawawawawa [img(https://codeberg.org/0x57e11a/markdoll/raw/branch/main/button.png):: alt text goes here (88x31 button that says MADE WITH MARKDOLL) ] ``` its the stuff between the --- and --- thing is IS NOT YAML do NOT yaml this. it is `key: value` and value is a string no exceptions!!!!!!!!! ### step 3b: make another layout so we can add more layouts to `layouts/` folder, maybe have one for the smart sysmate and one for the silly sysmate and switch between them using `layout` in frontmatter so together, `layouts/aki.html` ```html %%TITLE%%:doll/aki %%HEAD%%
%%CONTENT%%
``` and then a simple `aki.doll` ``` --- title: hi it is layout: aki.html --- &its aki!!!!!!!!! awawa ``` this will produce a different output containing 100% more aki ### step 4: build it (n stuff) the easiest way to _just output stuff_ is ```sh nix build . # if using flakes nix-build # if not # to look at it nix-shell -p python3 --command "python -m http.server -d result" ``` and open http://localhost:8000