···1313index_template="$(jq -r '.["$index-template"]' <<<"$defaults")"
1414! [ -e "$index_template" ] && echo "${0}: error: ${rel_root}${index_template} does not exist" >&2 && exit 1
15151616-# generate the code syntax highlighting css
1717-# unfortunately pandoc did not like --template=<(echo ...)
1818-# shellcheck disable=SC2016
1919-echo '$highlighting-css$' > ./highlighting.css
2020-# time to prank pandoc epic style
2121-echo $'``` c\n```' | pandoc -f djot -t html5 \
2222- --template=./highlighting.css -o ./highlighting.css \
2323- --highlight-style=tango # to be replaced, probably
2424-2525-# ...because of this. and because it looks eh
2626-cat >> ./highlighting.css <<EOF
2727-.sourceCode { color: black; }
2828-EOF
2929-3016sed "/${template_start}/q" "${index_template}" > ./index.html
31173218# this... thing turns the template in the html into a json string with jq string interpolation, to be passed back into jq
+30-2
src/blog/2025-09-14-test/content.djot
···11111212I am Steve Jobs? I am Steve Jobs.
13131414+{.numberSource}
1415``` c
1516// a more realistic code example
1717+// TODO somethinbg
1818+#define SOMETHING 1
1619for (i = 0; i < samplecount; i++) {
1720 int8_t s = samples[i];
1818-1919- // correlation: multiply by sine and cosine f=1200Hz and 2200Hz
2121+2222+ // correlation: multiply by sine and cosine f=1200Hz and 2200Hz
2023 // 1200.0 * SPS = samplerate
2124 // & (1<<int(SPS/8+1) - 1)
2225 int_mark_i[i & 0b111] = sin(TWOPI * i * (1200.0 / (1200.0 * SPS))) * s;
···3740 float sum_mark = sum_mark_i*sum_mark_i + sum_mark_q*sum_mark_q;
3841 float sum_space = sum_space_i*sum_space_i + sum_space_q*sum_space_q;
3942/* ... */
4343+```
4444+4545+``` python
4646+import math
4747+from typing import Callable
4848+4949+nothing = None
5050+# ever happens
5151+5252+TWOPI = 2 * math.pi
5353+5454+@something
5555+def make_table(name: str, end: int, f: Callable[[int], float]) -> None:
5656+ """
5757+ create C table from the values of a function
5858+ """
5959+ print(f"int8_t {name}[] = {{\n ", end="")
6060+ for i in range(end):
6161+ n = math.floor(f(i) * 127)
6262+ print(f"{n:4}, ", end=("\n " if i % 10 == 9 else ""))
6363+ print("\n};")
6464+6565+make_table("cos_1200_4", 4, lambda x: math.cos(TWOPI * (1200/9600) * x))
6666+make_table("cos_2200_24", 24, lambda x: math.cos(TWOPI * (2200/9600) * x))
6767+make_table("sin_2200_24", 24, lambda x: math.sin(TWOPI * (2200/9600) * x))
4068```
41694270i promise i'll change this syntax highlighting theme i know it looks bad