update testbed

This commit is contained in:
Daniel Fichtinger 2025-07-04 13:17:59 -04:00
parent 0de1e63a3e
commit eae5db6b4a
11 changed files with 106 additions and 7 deletions

View file

@ -34,6 +34,7 @@ def md_to_html(
## Kakoune Script?! ## Kakoune Script?!
```kak ```kak
# a configuration snippet
declare-option -hidden bool on_server %sh{ declare-option -hidden bool on_server %sh{
if [ -z "$KAK_ON_SERVER" ]; then if [ -z "$KAK_ON_SERVER" ]; then
printf 'false' printf 'false'
@ -44,4 +45,5 @@ declare-option -hidden bool on_server %sh{
define-command -override true nop define-command -override true nop
define-command -override false fail define-command -override false fail
map global normal x ':echo gamer<ret>'
``` ```

View file

@ -1,5 +1,6 @@
--- ---
post: true post: true
date: September 3, 2025
--- ---
Okay, here's a post. It references [topic](./topic.md). What?? Okay, here's a post. It references [topic](./topic.md). What??

View file

@ -141,13 +141,21 @@ pre {
overflow-x: auto; overflow-x: auto;
} }
code { /* Inline code styling */
background-color: #1d1d1d; :not(pre) > code {
color: #d5d5d5;
padding: 0.2em 0.4em; padding: 0.2em 0.4em;
border-radius: 3px; border-radius: 3px;
background-color: #1d1d1d;
color: #d5d5d5;
font-size: 0.85em;
} }
/* Block code styling (inherits from pre) */
pre code {
padding: 0;
border-radius: 0;
background: none;
}
small { small {
font-size: 0.95rem; font-size: 0.95rem;
@ -234,3 +242,6 @@ small a {
color: var(--main-small-text-color); color: var(--main-small-text-color);
} }

6
content/wip.md Normal file
View file

@ -0,0 +1,6 @@
---
title: This Post Is WIP
draft: true
---
I don't want this in the website!

View file

@ -1,8 +1,8 @@
init: init:
#!/bin/sh #!/bin/sh
if [ -f config.yml ]; then # if [ -f config.yml ]; then
rm config.yml # rm config.yml
fi # fi
just run init just run init
build: build:
@ -16,5 +16,5 @@ run *args:
if [ -d "public" ] && [ "$1" = "build" ]; then if [ -d "public" ] && [ "$1" = "build" ]; then
rm -r public rm -r public
fi fi
uv run --project ~/dev/zona-py zona "$@" uv run --project ~/dev/zona zona "$@"

40
templates/base.html Normal file
View file

@ -0,0 +1,40 @@
<!doctype html>
<html>
<head>
<title>{{ metadata.title }}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="UTF-8" />
<link
href="{{ metadata.style }}"
rel="stylesheet"
type="text/css"
media="all"
/>
<link
href="/static/pygments.css"
rel="stylesheet"
type="text/css"
media="all"
/>
</head>
<body>
<div id="container">
{% if header %}
<header id="header">
<center>
{{ header | safe }}
</center>
<hr>
</header>
{% endif %}
{% block content %}{% endblock %}
{% if footer %}
<footer id="footer">
<hr>
{{ footer | safe }}
</footer>
{% endif %}
</div>
</body>
</html>

6
templates/basic.html Normal file
View file

@ -0,0 +1,6 @@
{% extends "base.html" %}
{% block content %}
{{ content | safe }}
{% endblock %}

1
templates/footer.md Normal file
View file

@ -0,0 +1 @@
My Markdown footer!

5
templates/header.html Normal file
View file

@ -0,0 +1,5 @@
<ul>
{% for name, url in site_map.items() %}
<li><a href="{{ url }}">{{ name }}</a></li>
{% endfor %}
</ul>

10
templates/page.html Normal file
View file

@ -0,0 +1,10 @@
{% extends "base.html" %}
{% block content %}
<center><h1>{{ metadata.title }}</h1></center>
{% if metadata.date %}
<center><small><time datetime="{{ metadata.date | safe }}">{{ metadata.date | safe}}</time></small></center>
{% endif %}
<article>{{ content | safe }}</article>
{% endblock %}

17
templates/post_list.html Normal file
View file

@ -0,0 +1,17 @@
{% extends "base.html" %}
{% block content %}
<center><h1>{{ metadata.title }}</h1></center>
<article>{{ content | safe }}</article>
{% if post_list %}
<ul>
{% for item in post_list %}
<li><small><time datetime="{{ item.metadata.date | safe }}">{{ item.metadata.date | safe}}</time></small>: <a href="/{{ item.url }}">{{ item.metadata.title }}</a></li>
{% endfor %}
</ul>
{% endif %}
{% endblock %}