M Makefile => Makefile +17 -17
@@ 3,9 3,9 @@ CFLAGS=-Wall -Wextra -Werror -pedantic -O2 -std=c99
DEVSERVER='https://raw.githubusercontent.com/emikulic/darkhttpd/refs/heads/master/darkhttpd.c'
-.PHONY: all serve pages static
+.PHONY: all serve pages
-all: mkpage aggregate pages
+all: mkpage aggregate pages out/favicon.ico
serve: all darkhttpd
./darkhttpd out
@@ 25,12 25,11 @@ aggregate: kethel2/aggregate.c
$(CC) $(CFLAGS) -c kethel2/aggregate.c -o obj/aggregate.o
$(CC) $(CFLAGS) obj/aggregate.o -o aggregate
-# TODO: manage statics in a better way than `cp -r`
-#static:
-# cp -r static out/static
+out/favicon.ico: favicon.png
+ ffmpeg -y -i favicon.png out/favicon.ico
# list of all pages
-pages: out/index.html out/colophon.html out/thoughts.html out/blog/index.html out/blog/helloworld.html out/feed.atom
+pages: out/index.html out/colophon.html out/microblog.html out/macroblog/index.html out/macroblog/kethel2.html out/feed.atom
out/index.html: index.html mkpage
@mkdir -p out
@@ 40,21 39,22 @@ out/colophon.html: colophon.html mkpage
@mkdir -p out
./mkpage colophon.html out/colophon.html
-out/thoughts.html: thoughts/data.tsv thoughts/item.html thoughts/index.html aggregate mkpage
+out/microblog.html: microblog/data.tsv microblog/item.html microblog/index.html aggregate mkpage
@mkdir -p out obj
- ./aggregate thoughts/data.tsv thoughts/item.html thoughts/index.html obj/thoughts.o.html
- ./mkpage obj/thoughts.o.html out/thoughts.html
+ ./aggregate microblog/data.tsv microblog/item.html microblog/index.html obj/microblog.o.html
+ ./mkpage obj/microblog.o.html out/microblog.html
-out/blog/index.html: blog/data.tsv blog/index.html blog/item.html aggregate mkpage
+out/macroblog/index.html: macroblog/data.tsv macroblog/index.html macroblog/item.html aggregate mkpage
@mkdir -p out obj
- ./aggregate blog/data.tsv blog/item.html blog/index.html obj/blogroll.o.html
- ./mkpage obj/blogroll.o.html out/blog/index.html
+ @mkdir -p out/macroblog
+ ./aggregate macroblog/data.tsv macroblog/item.html macroblog/index.html obj/blogroll.o.html
+ ./mkpage obj/blogroll.o.html out/macroblog/index.html
-out/blog/helloworld.html: blog/helloworld.html mkpage
- @mkdir -p out
- ./mkpage blog/helloworld.html out/blog/helloworld.html
+out/macroblog/kethel2.html: macroblog/kethel2.html mkpage
+ @mkdir -p out/macroblog
+ ./mkpage macroblog/kethel2.html out/macroblog/kethel2.html
-out/feed.atom: thoughts/data.tsv
+out/feed.atom: microblog/data.tsv
@mkdir -p out obj
- ./aggregate thoughts/data.tsv thoughts/feed.html NONE obj/thoughts.o.atom
+ ./aggregate microblog/data.tsv microblog/feed.html NONE obj/microblog.o.atom
./mkpage feed.atom out/feed.atom
M TODO => TODO +1 -6
@@ 1,11 1,6 @@
- media reviews n so
-- gallery
-- atom feeds
+- atom feeds (microblog: done, todo macro & reviews);
atom feed is NEARLYYY done for /microblog, /macroblog still needs some work
/reviews is generally a more specialised form of blog, maybe cool stats?
-steam-esque reviews as in REC/NREC.
-
-/gallery more as a "media lookup", with all <img>s from blogposts linking to here
-semi-wikimedia-esque
D blog/data.tsv => blog/data.tsv +0 -2
@@ 1,2 0,0 @@
-rowid bdate LINK TITLE SUMMARY
-0 2026-09-15T16:39:46+0200 /blog/helloworld.html Hello, world! Testing blog post :3
D blog/helloworld.html => blog/helloworld.html +0 -31
@@ 1,31 0,0 @@
-<!DOCTYPE html>
-<html lang="en">
- <head>
-<!--LOAD include/stdhead.html -->
- <title>blog: hello, world! - m1kadev.nl</title>
- </head>
-
- <body>
-<!--LOAD include/stdnav.html -->
- <main>
- <h1>hello, world!</h1>
- <p>
- Testing content bli bla blu
- </p>
- <img
- alt="Chud, with a 'billions must try' T-shirt - facing the camera, and showing one of his first drawings. Behind him, a monitor which displays a manuscript of 'Chud's tool story'."
- width="512"
- height="512"
- src="/static/5f7b6ed8dce89bcce3c1afde8a9d3566.jpeg"
- />
- <h2 id="why">
- Why, though?
- </h2>
- <p>
- Why not?
- </p>
- </main>
- <hr>
-<!--LOAD include/stdfooter.html -->
- </body>
-</html>
M colophon.html => colophon.html +3 -3
@@ 20,14 20,14 @@
<p>
The current iteration of m1kadev.nl is an experiment, to see how far i could get by using
- as little javascript and css, and with as little intermediate steps as possible, while still
- having a functional site
+ as little javascript and css, and with as little intermediate steps as possible, while still
+ having a functional site.
</p>
<p>Used technologies:</p>
<ul>
<li><code>make</code> - as to not rebuild half the site for 1 change</li>
<li><code>mkpage</code> and <code>aggregate</code> - 2 C programs, which generate single pages and page indices, respectively.</li>
- <li><code>darkhttpd</code> - the development http server</li>
+ <li><code>darkhttpd</code> - the static html server</li>
</ul>
</main>
<hr>
A favicon.png => favicon.png +0 -0
M feed.atom => feed.atom +1 -1
@@ 16,5 16,5 @@
Kethel 2
</generator>
<!--STAMP -->
-<!--LOAD obj/thoughts.o.atom -->
+<!--LOAD obj/microblog.o.atom -->
</feed>
D gallery/index.html => gallery/index.html +0 -15
@@ 1,15 0,0 @@
-<!DOCTYPE html>
-<html lang="en">
- <head>
-<!--LOAD include/stdhead.html -->
- <title>PAGETITLE - m1kadev.nl</title>
- </head>
-
- <body>
-<!--LOAD include/stdnav.html -->
- <main>
- <h1>your content here</h1>
- </main>
-<!--LOAD include/stdfooter.html -->
- </body>
-</html>
M => +1 -1
@@ 1,3 1,3 @@
<footer>
<p>Built with <code>make</code> and 2 C programs. <a href="/colophon.html">colophon</a>.</p>
</footer>
</footer>
\ No newline at end of file
M include/stdhead.html => include/stdhead.html +8 -1
@@ 12,6 12,13 @@ a {
}
a:visited {
font-style: initial;
- color: #0000ee;
+ color: #ee41b4;
+}
+
+@media (prefers-color-scheme: dark) {
+ html {
+ background-color: #212121;
+ color: #F5F5F5;
+ }
}
</style>
M include/stdnav.html => include/stdnav.html +3 -4
@@ 3,10 3,9 @@
/
<nav style="display: inline">
<a href="/">root</a> |
- <a href="/blog/index.html">macroblog</a> |
- <a href="/thoughts.html">microblog</a> |
- <a href="/art/index.html">art</a> |
- <a href="/review/index.html">media</a> |
+ <a href="/macroblog/index.html">macroblog</a> |
+ <a href="/microblog.html">microblog</a> |
+ <a href="/review/index.html">review</a> |
<a href="/colophon.html">colophon</a>
</nav>
</header>
M kethel2/aggregate.c => kethel2/aggregate.c +2 -2
@@ 113,7 113,7 @@ void write_item_data(char* restrict row, const char* restrict template, FILE* ou
/// 2. a schema, usually a <p> tag with replacers for csv items with idx > 0
int main(int argc, char* argv[]) {
if (argc <= 4) {
- fputs("usage: aggregate <data.csv> <item.html> <index.html> <output.html>\n", stderr);
+ fputs("usage: aggregate <data.tsv> <item.html> <index.html> <output.html>\n", stderr);
return -1;
}
@@ 124,7 124,7 @@ int main(int argc, char* argv[]) {
char buf[512];
if (strncmp(argv[3], "NONE", strlen("NONE")) != 0) {
- FILE* index = fopen(argv[3], "r");
+ index = fopen(argv[3], "r");
while (fgets(buf, sizeof(buf), index) != NULL) {
if (strncmp(buf, "<!-- PUT", 7) == 0) {
break;
M kethel2/mkpage.c => kethel2/mkpage.c +1 -1
@@ 22,7 22,7 @@ int main(int argc, char* argv[]) {
}
uintptr_t lineno = 0;
- char buf[256]; // ! NOTE: lines longer than 255 chars do not process correctly
+ char buf[1024]; // ! NOTE: lines longer than 255 chars do not process correctly
while (fgets(buf, sizeof(buf), input) != NULL) {
lineno++;
A macroblog/data.tsv => macroblog/data.tsv +2 -0
@@ 0,0 1,2 @@
+rowid bdate LINK TITLE SUMMARY
+0 2026-09-15T16:39:46+0200 /macroblog/kethel2.html A high level overview of a low level SSG I've been meaning to rewrite my old elixir-based SSG for a newer, and easier to set up alternative.
R blog/index.html => macroblog/index.html +0 -0
R blog/item.html => macroblog/item.html +0 -0
A macroblog/kethel2.html => macroblog/kethel2.html +33 -0
@@ 0,0 1,33 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+<!--LOAD include/stdhead.html -->
+ <title>blog: kethel/2 - m1kadev.nl</title>
+ </head>
+
+ <body>
+<!--LOAD include/stdnav.html -->
+ <main>
+ <h1>Kethel/2: A high level overview of a low-level SSG</h1>
+ <p>
+ I've been meaning to rewrite my old elixir-based SSG for a newer, and easier to set up alternative.
+ So, what language is the most portable, has universal support across linux distributions?
+ <code>ISO/IEC 9899:1999</code>, or <em>The C Programming Language</em> - of course!
+ </p>
+ <p>
+ Kethel isn't a perfect SSG by any means; it sometimes just writes garbled data to the output HTML fil
+ if a template or TSV ends with a newline, is probably vulnerable to several buffer overflow attacks,
+ as no bounds checking is implemented at all for the templates, and treats HTML as plain text, with only a
+ <code>strncmp</code> "parser". Yet, it still works! <br />
+ So, I'd like to explain some design decisions behind Kethel, and convince YOU to use less CSS in your website!
+ </p>
+ <h2><code>aggregate.c</code>, and the solution to index page generation</h2>
+ <p>
+ The kethel2 workflow is heavily inspired by my experiences with <code>make</code>, linking errors, and C object files.
+
+ </p>
+ </main>
+ <hr>
+<!--LOAD include/stdfooter.html -->
+ </body>
+</html>
R thoughts/data.tsv => microblog/data.tsv +1 -1
@@ 1,2 1,2 @@
thought bdate BODY AUTHOR
-0 2026-09-15T18:31:15+02:00 we always call it the 'fridge',, Howevere, why do we not call outside the 'warmdge' ? mika
+0 2026-09-15T18:31:15+02:00 we always call it the 'fridge',, Howevere, why do we not call outside the 'warmdge' ? mika,
R thoughts/feed.html => microblog/feed.html +0 -0
R thoughts/index.html => microblog/index.html +0 -0
R thoughts/item.html => microblog/item.html +1 -1
@@ 4,7 4,7 @@
</blockquote>
<figcaption>
<!-- PUT 2 -->
-, at
+at
<!-- DATE -->
</figcaption>
</figure>