examples | ||
pkgs | ||
.gitignore | ||
default.nix | ||
flake.lock | ||
flake.nix | ||
README.md |
Teapot
because doll. it uses 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)
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..
<!DOCTYPE html public "awawawawa">
<html>
<head>
<meta charset="utf-8" />
<title>%%TITLE%%:doll</title>
%%HEAD%%
<style>
body {
background-color: #0a0103;
color: #c24444;
font-family: system-ui;
}
</style>
</head>
<body>
<main>%%CONTENT%%</main>
</body>
</html>
step 2a: what the %%%% do
the layout engine knows three keywords:
%%TITLE%%
which comes from either the filename (soindex.doll
->index
) or the frontmattertitle
key (what is a frontmatter? skip to step 3a)%%HEAD%%
which is filled in by the following frontmatter keys:description
becomes a meta:description tagtags
becomes a meta:keywords tagauthor
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
<!DOCTYPE html public "awawawawa">
<html>
<head>
<meta charset="utf-8" />
<title>%%TITLE%%:doll/aki</title>
%%HEAD%%
<style>
body {
background-color: #0a0103;
color: rgb(225, 0, 255);
font-family: system-ui;
}
</style>
</head>
<body>
<nav>aki!!!!!!!!!</nav>
<main>%%CONTENT%%</main>
</body>
</html>
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
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