~mika/kethel2

4deb92bbb6b5ba1cf4d2ab26e28f3d564a67308d — mika a month ago 0abf87c
blogroll
M .gitignore => .gitignore +2 -2
@@ 1,7 1,7 @@
/mkpage
/mkpage.o
/out
/darkhttpd*
/tmp
/aggregate

/out/**/*
/tmp/**/*

M Makefile => Makefile +9 -3
@@ 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 
.PHONY: all serve pages

all: mkpage aggregate out/index.html out/colophon.html out/thoughts.html
all: mkpage aggregate pages

serve: all darkhttpd
	./darkhttpd out


@@ 25,6 25,9 @@ aggregate: kethel2/aggregate.c
	$(CC) $(CFLAGS) tmp/aggregate.o -o aggregate

# list of all pages

pages: out/index.html out/colophon.html out/thoughts.html out/blog/index.html

out/index.html: index.html
	./mkpage index.html out/index.html



@@ 32,6 35,9 @@ out/colophon.html: colophon.html
	./mkpage colophon.html out/colophon.html

out/thoughts.html: thoughts/data.tsv thoughts/item.html thoughts/index.html
	mkdir -p ./tmp
	./aggregate thoughts/data.tsv thoughts/item.html thoughts/index.html tmp/thoughts.o.html
	./mkpage tmp/thoughts.o.html out/thoughts.html

out/blog/index.html: blog/data.tsv blog/index.html blog/item.html
	./aggregate blog/data.tsv blog/item.html blog/index.html tmp/blogroll.o.html
	./mkpage tmp/blogroll.o.html out/blog/index.html

A blog/data.tsv => blog/data.tsv +2 -0
@@ 0,0 1,2 @@
rowid	LINK	TITLE	SUMMARY
0	/blog/helloworld.html	Hello, world!	Testing blog post :3

A blog/index.html => blog/index.html +22 -0
@@ 0,0 1,22 @@
<!DOCTYPE html>
<html lang="en">
    <head>
<!--LOAD include/stdhead.html -->
        <title>blogroll - m1kadev.nl</title>
    </head>

    <body>
<!--LOAD include/stdnav.html -->
        <main>
            <h1>blogroll</h1>
            <p>
                <em lang="fr">Voici, mes amies</em>, my <em lang="fr">assorti des essais</em>.
            </p>
            <nav>
<!-- PUT -->
            </nav>
        </main>
        <hr>
<!--LOAD include/stdfooter.html -->
    </body>
</html>

A blog/item.html => blog/item.html +11 -0
@@ 0,0 1,11 @@
<!-- ANCHOR div -->
<h2>
<!-- LINK 1 -->
<!-- PUT 2 -->
</a>
</h2>

<p>
<!-- PUT 3 -->
</p>
</div>

M colophon.html => colophon.html +2 -2
@@ 16,16 16,16 @@
            <p>
                The current iteration of m1kadev.nl was an experiment, to see how far one could get by using
                as little javascript and css possible, with as little build steps as possible. Which I think
                I've succeeded in rather well. This entire site uses only one (!) CSS rule at the moment.
                I've succeeded in rather well.
            </p>
            <p>Used technologies:</p>
            <ul>
                <li><code>make</code> (BSD)  - as to not rebuild half the site for 1 change</li>
                <li>C99 - the build system is (as of 13/09/2026) only 70 lines of 100% POSIX C</li>
                <li><code>darkhttpd</code> - the development http server</li>
                <li><code>sqlite3</code> - the sql database engine, mostly there for rss feeds</li>
            </ul>
        </main>
        <hr>
<!--LOAD include/stdfooter.html -->
    </body>
</html>

M include/stdfooter.html => include/stdfooter.html +1 -2
@@ 1,4 1,3 @@
<hr>
<footer>
<p>Built with BSD make and C99. <a href="/colophon.html">colophon</a></p>
<p>Built with Make and C99. <a href="/colophon.html">colophon</a>.</p>
</footer>

M include/stdnav.html => include/stdnav.html +1 -0
@@ 5,6 5,7 @@
        <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> |
    </nav>
</header>

M index.html => index.html +4 -3
@@ 8,15 8,15 @@
    <body>
<!--LOAD include/stdnav.html -->
        <main>
            <h2>
            <h1>
                Welcome, sit down and
                <a href="https://www.rfc-editor.org/info/rfc7168/#section-2.1" >grab a <code>BREW</code></a>!
            </h2>
            </h1>

            <p>
                I'm currently in my exam year of highschool
                (<abbr title="(Dutch) Pre-university Physics/Biology">VWO-NT/NG</abbr>).
                However, this hasn't stopped me from <a href="/thought/index.html">shitposting on main</a>, <a href="/blog/index.html">vagueposting on main</a>,
                However, this hasn't stopped me from <a href="/thoughts.html">shitposting on main</a>, <a href="/blog/index.html">vagueposting on main</a>,
                and <a href="/review/index.html">livetweeting about the latest game/series/<span title="in american that's movie">film</span></a> i've watched.
            </p>



@@ 25,6 25,7 @@
                    <br><em>-mika</em>
            </p>
        </main>
        <hr>
<!--LOAD include/stdfooter.html -->
    </body>
</html>

M kethel2/aggregate.c => kethel2/aggregate.c +4 -0
@@ 75,6 75,10 @@ void write_item_data(char* restrict row, const char* restrict template, FILE* ou
			int offset = strlen("<!-- PUT ");
			unsigned char idx = templateLine[offset] - 0x30;
			fputs(data[idx], out);
		} else if (strncmp(templateLine, "<!-- LINK", strlen("<!-- LINK") - 1) == 0) {
		    int offset = strlen("<!-- LINK ");
			unsigned char idx = templateLine[offset] - 0x30;
			fprintf(out, "<a href=\"%s\">", data[idx]);
		} else {
			fputs(templateLine, out);
		}

M thoughts/index.html => thoughts/index.html +2 -0
@@ 8,6 8,8 @@
    <body>
<!--LOAD include/stdnav.html -->
        <main>
            <h1>microblog :3</h1>
            <p>i have no twitter and i must post</p>
<!-- PUT -->
        </main>
<!--LOAD include/stdfooter.html -->

M thoughts/item.html => thoughts/item.html +1 -0
@@ 8,3 8,4 @@
<!-- PUT 3 -->
</figcaption>
</figure>
<hr>

A todo => todo +4 -0
@@ 0,0 1,4 @@
- reviews
- art / pictures
- rss
- done :)