Add: Beliefs

WIP: Blog
This commit is contained in:
2025-02-13 21:09:48 +01:00
parent 49f1f015df
commit 0928cc0b45
10 changed files with 125 additions and 27 deletions

View File

@@ -1,29 +1,35 @@
.PHONY: mkdist clean
.PHONY: all mkdist watch clean
all: clean index now links
rm -rf dist/template.html
SRC_DIR = src
PAGES_DIR = $(SRC_DIR)/pages
BLOG_DIR = $(SRC_DIR)/blog
DIST_DIR = dist
PAGES = $(notdir $(wildcard $(PAGES_DIR)/*.html))
BLOG_PAGES = $(wildcard $(BLOG_DIR)/*.md)
TARGETS = $(addprefix $(DIST_DIR)/,$(PAGES))
all: $(PAGES_DIR)/blog.html $(TARGETS)
rm -rf $(DIST_DIR)/template.html
watch:
while sleep 1 ; do \
find ./src -iname '*.html' -o -name "*.css" \
find ./$(SRC_DIR) -iname '*.html' -o -name "*.css" \
| entr -d make -f ./Makefile ; \
done
mkdist:
mkdir -p dist
mkdir -p $(DIST_DIR)
template: mkdist src/start.html src/nav.html src/side.html
cp -r src/styles dist
cat src/start.html src/nav.html src/side.html > dist/template.html
template: $(SRC_DIR)/start.html $(SRC_DIR)/nav.html $(SRC_DIR)/side.html | mkdist
cp -r $(SRC_DIR)/styles $(DIST_DIR)
cat $(SRC_DIR)/start.html $(SRC_DIR)/nav.html $(SRC_DIR)/side.html > dist/template.html
index: template src/pages/index.html
cat dist/template.html src/pages/index.html src/end.html > dist/index.html
$(PAGES_DIR)/blog.html: $(BLOG_PAGES)
pandoc -f markdown -t html $^ -o $@
now: template src/pages/now.html
cat dist/template.html src/pages/now.html src/end.html > dist/now.html
links: template src/pages/links.html
cat dist/template.html src/pages/links.html src/end.html > dist/links.html
$(DIST_DIR)/%.html: $(PAGES_DIR)/%.html | template mkdist
cat $(DIST_DIR)/template.html $(PAGES_DIR)/$*.html $(SRC_DIR)/end.html > $@
clean:
rm -rf dist

41
src/blog/1.md Normal file
View File

@@ -0,0 +1,41 @@
# This website
Naturally I devote the first blog post to the website.
Let's find out if I have any skills in writing such things.
## Motivation
The motivation for the website came from frustration with modern sites and a bit of nostalgia.
But mainly I wanted the [now()](now.html) and the [beliefs()](beliefs.html) pages, such that I
have a public place to document what I'm doing and what I believe and have a corrective.
I can't remember where I read about it the first time, but I thought the idea was neat.
Especially as more of a private person, it motivates me to keep going with things.
Having programmed quite some time with modern JS/TS frameworks I'm a stark oppponent of this
whole technology stack. It just adds layers and layers and complexity over complexity
nobody ever will ever understand. As such I just wanted a simple plain html+css stack,
suppported by Linux programs.
## Technical details
You can find the whole source code of this in my [git()](https://git.rhetenor.de).
Beside HTML+CSS I wanted a bit of a template mechanism, but didn't want it to be utterly complex.
### Building a page
As such I build this sites together with `cat`.
To start the template I have a `start.html` which contains everything from the start `<html>` tag,
the whole `<head>` and the start `<body>` tag. Then the `nav.html` with the navigation and the
`side.html` with the sidebar gets included. Afterwards the actual page gets included and at the end
the `end.html` which just closes the tags.
So for example the `index.html` page is built using `cat start.html nav.html side.html index.html end.html`
### Automating using make
I automated this for a whole folder using a Makefile on which I don't want to elaborate, it's just a
standard Makefile. Simple at the start and getting more cryptic as more one works on it. Probably the
story of all Makefiles.
### Blog
Since I'm not that much of a fan of writing HTML all the time, but quite some fan of Markdown, I decided to
use it for this blog. I write these posts as .md pages and convert them using pandoc with
`pandoc -f markdown -t html *.md -o blog.html`. All of this also automated using markdown.

View File

@@ -1,3 +0,0 @@
# hej
ein test
** toller blogpost **

View File

@@ -1,6 +0,0 @@
<h1 id="hej">hej</h1>
<p>ein test ** toller blogpost **</p>
<h1 id="lol">lol</h1>
<p>another test</p>
<p>** with an even better english blogpost ** oO</p>
<p>i dont care about this</p>

View File

@@ -4,7 +4,7 @@
<li><a href="/blog" aria-label="Blog">blog()</a></li>
<li><a href="/now" aria-label="Now">now()</a></li>
<li><a href="/links" aria-label="Links">links()</a></li>
<li><a href="/misc">misc()</a></li>
<li><a href="/beliefs">beliefs()</a></li>
<li><a href="https://git.rhetenor.de" aria-label="External link to my git">git()</a></li>
</ul>
</nav>

14
src/pages/beliefs.html Normal file
View File

@@ -0,0 +1,14 @@
<main id="beliefs">
<h1 id="mainHeading">mount /dev/beliefs</h1>
A page with my beliefs. I will try to update it from time to time, and strike out what has changed.
<h2>Programming</h2>
<h3>Premature optimization</h3>
<p>
<blockquote cite="Donald Knuth - The Art of Programming">“The real problem is that programmers have spent far too much time worrying about efficiency in the wrong places and at the wrong times; premature optimization is the root of all evil (or at least most of it) in programming.”</blockquote>
I really belief in optimization and code is far too unoptimized nowadays. But neithertheless are too many people still in the belief that low level bit optimization is an end in itself!
</p>
</main>

46
src/pages/blog.html Normal file
View File

@@ -0,0 +1,46 @@
<h1 id="this-website">This website</h1>
<p>Naturally I devote the first blog post to the website. Lets find out
if I have any skills in writing such things.</p>
<h2 id="motivation">Motivation</h2>
<p>The motivation for the website came from frustration with modern
sites and a bit of nostalgia. But mainly I wanted the <a
href="now.html">now()</a> and the <a href="beliefs.html">beliefs()</a>
pages, such that I have a public place to document what Im doing and
what I believe and have a corrective. I cant remember where I read
about it the first time, but I thought the idea was neat. Especially as
more of a private person, it motivates me to keep going with things.</p>
<p>Having programmed quite some time with modern JS/TS frameworks Im a
stark oppponent of this whole technology stack. It just adds layers and
layers and complexity over complexity nobody ever will ever understand.
As such I just wanted a simple plain html+css stack, suppported by Linux
programs.</p>
<h2 id="technical-details">Technical details</h2>
<p>You can find the whole source code of this in my <a
href="https://git.rhetenor.de">git()</a>. Beside HTML+CSS I wanted a bit
of a template mechanism, but didnt want it to be utterly complex.</p>
<h3 id="building-a-page">Building a page</h3>
<p>As such I build this sites together with <code>cat</code>. To start
the template I have a <code>start.html</code> which contains everything
from the start <code>&lt;html&gt;</code> tag, the whole
<code>&lt;head&gt;</code> and the start <code>&lt;body&gt;</code> tag.
Then the <code>nav.html</code> with the navigation and the
<code>side.html</code> with the sidebar gets included. Afterwards the
actual page gets included and at the end the <code>end.html</code> which
just closes the tags.</p>
<p>So for example the <code>index.html</code> page is built using
<code>cat start.html nav.html side.html index.html end.html</code></p>
<h3 id="automating-using-make">Automating using make</h3>
<p>I automated this for a whole folder using a Makefile on which I dont
want to elaborate, its just a standard Makefile. Simple at the start
and getting more cryptic as more one works on it. Probably the story of
all Makefiles.</p>
<h3 id="blog">Blog</h3>
<p>Since Im not that much of a fan of writing HTML all the time, but
quite some fan of Markdown, I decided to use it for this blog. I write
these posts as .md pages and convert them using pandoc with
<code>pandoc -f markdown -t html *.md -o blog.html</code>. All of this
also automated using markdown.</p>
<h1 id="lol">lol</h1>
<p>another test</p>
<p>** with an even better english blogpost ** oO</p>
<p>i dont care about this</p>

View File

@@ -5,7 +5,7 @@
Hej and welcome to my personal homepage.
</p>
<p>
Probably not the catchiest phrase but definitely nostalgic towards the early 2000s homepages.
Just being nostalgic towards the early 2000s era of homepages.
Since I'd like to live in a world of small independent unique websites,
this site is my kind of contribution.
</p>
@@ -14,7 +14,7 @@
(Stronger) opinions and beliefs in my <a href="/blog">blog()</a>,
things I'm doing right <a href="/now">now()</a>,
a more or less curated <a href="/link">link()</a> list
and a collection of my personal <a href="/philosophy">philosophy()</a> for whomever cares.
and a collection of my personal <a href="/beliefs">beliefs()</a> for whomever cares.
I also share some tools and their code for whomever they are useful to.
</p>
<p>