Add: Beliefs
WIP: Blog
This commit is contained in:
36
Makefile
36
Makefile
@@ -1,29 +1,35 @@
|
|||||||
.PHONY: mkdist clean
|
.PHONY: all mkdist watch clean
|
||||||
|
|
||||||
all: clean index now links
|
SRC_DIR = src
|
||||||
rm -rf dist/template.html
|
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:
|
watch:
|
||||||
while sleep 1 ; do \
|
while sleep 1 ; do \
|
||||||
find ./src -iname '*.html' -o -name "*.css" \
|
find ./$(SRC_DIR) -iname '*.html' -o -name "*.css" \
|
||||||
| entr -d make -f ./Makefile ; \
|
| entr -d make -f ./Makefile ; \
|
||||||
done
|
done
|
||||||
|
|
||||||
mkdist:
|
mkdist:
|
||||||
mkdir -p dist
|
mkdir -p $(DIST_DIR)
|
||||||
|
|
||||||
template: mkdist src/start.html src/nav.html src/side.html
|
template: $(SRC_DIR)/start.html $(SRC_DIR)/nav.html $(SRC_DIR)/side.html | mkdist
|
||||||
cp -r src/styles dist
|
cp -r $(SRC_DIR)/styles $(DIST_DIR)
|
||||||
cat src/start.html src/nav.html src/side.html > dist/template.html
|
cat $(SRC_DIR)/start.html $(SRC_DIR)/nav.html $(SRC_DIR)/side.html > dist/template.html
|
||||||
|
|
||||||
index: template src/pages/index.html
|
$(PAGES_DIR)/blog.html: $(BLOG_PAGES)
|
||||||
cat dist/template.html src/pages/index.html src/end.html > dist/index.html
|
pandoc -f markdown -t html $^ -o $@
|
||||||
|
|
||||||
now: template src/pages/now.html
|
$(DIST_DIR)/%.html: $(PAGES_DIR)/%.html | template mkdist
|
||||||
cat dist/template.html src/pages/now.html src/end.html > dist/now.html
|
cat $(DIST_DIR)/template.html $(PAGES_DIR)/$*.html $(SRC_DIR)/end.html > $@
|
||||||
|
|
||||||
links: template src/pages/links.html
|
|
||||||
cat dist/template.html src/pages/links.html src/end.html > dist/links.html
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf dist
|
rm -rf dist
|
||||||
|
|||||||
41
src/blog/1.md
Normal file
41
src/blog/1.md
Normal 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.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
# hej
|
|
||||||
ein test
|
|
||||||
** toller blogpost **
|
|
||||||
@@ -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>
|
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
<li><a href="/blog" aria-label="Blog">blog()</a></li>
|
<li><a href="/blog" aria-label="Blog">blog()</a></li>
|
||||||
<li><a href="/now" aria-label="Now">now()</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="/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>
|
<li><a href="https://git.rhetenor.de" aria-label="External link to my git">git()</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|||||||
14
src/pages/beliefs.html
Normal file
14
src/pages/beliefs.html
Normal 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
46
src/pages/blog.html
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
<h1 id="this-website">This website</h1>
|
||||||
|
<p>Naturally I devote the first blog post to the website. Let’s 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 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.</p>
|
||||||
|
<p>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.</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 didn’t 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><html></code> tag, the whole
|
||||||
|
<code><head></code> and the start <code><body></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 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.</p>
|
||||||
|
<h3 id="blog">Blog</h3>
|
||||||
|
<p>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
|
||||||
|
<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>
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
Hej and welcome to my personal homepage.
|
Hej and welcome to my personal homepage.
|
||||||
</p>
|
</p>
|
||||||
<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,
|
Since I'd like to live in a world of small independent unique websites,
|
||||||
this site is my kind of contribution.
|
this site is my kind of contribution.
|
||||||
</p>
|
</p>
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
(Stronger) opinions and beliefs in my <a href="/blog">blog()</a>,
|
(Stronger) opinions and beliefs in my <a href="/blog">blog()</a>,
|
||||||
things I'm doing right <a href="/now">now()</a>,
|
things I'm doing right <a href="/now">now()</a>,
|
||||||
a more or less curated <a href="/link">link()</a> list
|
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.
|
I also share some tools and their code for whomever they are useful to.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
|
|||||||
Reference in New Issue
Block a user