Browse Source

Get rid of the "misc" page. Just put it on the front page.

master
Niels G. W. Serup 2 years ago
parent
commit
f767cec81b
  1. 1
      nginx/base.conf
  2. 9
      scripts/transform-file.py
  3. 45
      site/index.md
  4. 42
      site/jokes.md
  5. 33
      site/misc/index.md
  6. 1
      template/base.html

1
nginx/base.conf

@ -104,6 +104,7 @@ location / {
rewrite ^/writings/two-spaces /two-spaces redirect;
rewrite ^/writings/ugs /ugs/ redirect;
rewrite ^/writings/unhappy /unhappy/ redirect;
rewrite ^/misc / redirect;
rewrite ^/bsq https://old-projects.metanohi.name/bsq/;

9
scripts/transform-file.py

@ -78,8 +78,8 @@ def markdown_to_html(input_file, output_dir):
relpath = os.path.relpath(input_file, start=common)
# Special cases
if relpath == 'site/misc/index.md':
top = read(input_file)
if relpath == 'site/index.md':
input_base = read(input_file)
pages = []
for path, subdirs, subfiles in os.walk(site_dir):
@ -97,7 +97,7 @@ def markdown_to_html(input_file, output_dir):
pages.append((dir + '/' + uri,
os.path.normpath(os.path.join(base_dir, path, name))))
builtins = ['/', '/about/', '/about/niels', '/misc/', '/404']
builtins = ['/', '/about/', '/about/niels', '/404']
pages = filter(lambda t: t[0] not in builtins, pages)
pages_new = []
for page in pages:
@ -116,8 +116,7 @@ def markdown_to_html(input_file, output_dir):
pabstract = '(No description)'
md += '[{}]({})\n ~ {}\n\n'.format(ptitle, url, pabstract)
bottom = md
content = pandoc_stdin(top + '\n' + bottom)
content = pandoc_stdin(input_base.replace('SPECIAL:ARTICLES', md))
else:
content = pandoc(input_file)

45
site/index.md

@ -3,33 +3,32 @@
This is the personal website of [Niels G. W. Serup](/about/niels).
## Riddles, jokes, and more
## Articles
-- What was the primary food source 100 million years ago in the
approximate area of today's Germany?
SPECIAL:ARTICLES
-- Dinosauerkraut!
---
## Burgerforslag.dk
The apocalyptic landscape was no one's friend. As another day dawned,
The scrap dealer Scrap once again put on her protective gear and exited
the cave on her roaring tricycle, ready for all challenges.
I have created a burgerized version of the danish
[Borgerforslag](https://www.borgerforslag.dk) at
[burgerforslag.dk](http://burgerforslag.dk).
Scrap soon crossed paths with a chaotic rider, but managed to get away
by driving safely. Good thing she brought the protective gear.
---
## My official webcomic
A person enters a bus and asks the driver how much a ticket costs. "2
units of the currency," the driver responds. The person is confused: 2
of what currency? After two seconds, the driver hands a ticket, closes
the doors, and starts driving. Cleverly, and with a satisfying sense of
comprehension, the person realises that the currency was time, and the
units were seconds. The bus then promptly stops, the driver looking
perplexed. "Was I wrong?" the person wonders, as the driver picks up an
LED lamp and touches the person twice. Nothing happens, the driver
apologises for "forgetting the new rules", and the person is thrown off
the bus -- after all, the person did not have two units of *the state of
being current*. (The funny point is that rules can be unclear and
change without making sense.)
I have an inactive webcomic called SUUM. It's located at
[suum.metanohi.name](https://suum.metanohi.name).
## Miscellaneous projects
See this listing of [git repositories](https://git.metanohi.name/),
mostly containing old and unmaintained programming things. Also this
website.
## Very old web experiments
For your pleasure: [nohiX](http://nohix.metanohi.name/) and [this
directory listing](http://projects.metanohi.name/).

42
site/jokes.md

@ -0,0 +1,42 @@
---
abstract: Of my very own creation.
---
# Riddles, jokes, and more
-- What was the primary food source 100 million years ago in the
approximate area of today's Germany?
-- Dinosauerkraut!
---
The apocalyptic landscape was no one's friend. As another day dawned,
The scrap dealer Scrap once again put on her protective gear and exited
the cave on her roaring tricycle, ready for all challenges.
Scrap soon crossed paths with a chaotic rider, but managed to get away
by driving safely. Good thing she brought the protective gear.
---
A person enters a bus and asks the driver how much a ticket costs. "2
units of the currency," the driver responds. The person is confused: 2
of what currency? After two seconds, the driver hands a ticket, closes
the doors, and starts driving. Cleverly, and with a satisfying sense of
comprehension, the person realises that the currency was time, and the
units were seconds. The bus then promptly stops, the driver looking
perplexed. "Was I wrong?" the person wonders, as the driver picks up an
LED lamp and touches the person twice. Nothing happens, the driver
apologises for "forgetting the new rules", and the person is thrown off
the bus -- after all, the person did not have two units of *the state of
being current*. (The funny point is that rules can be unclear and
change without making sense.)
---
-- What's the difference between a person *X* who studies the [279 Thule
asteroid](https://en.wikipedia.org/wiki/279_Thule) and a person *Y* who
destroys it?
-- X is thoughtful. Y just fought Thule.

33
site/misc/index.md

@ -1,33 +0,0 @@
# Miscellaneous items
This page contains things that I couldn't fit into other pages.
## My official webcomic
I have an inactive webcomic called SUUM. It's located at
[suum.metanohi.name](https://suum.metanohi.name).
## Burgerforslag.dk
I have created a burgerized version of the danish
[Borgerforslag](https://www.borgerforslag.dk) at
[burgerforslag.dk](http://burgerforslag.dk).
## Very old web experiments
For your pleasure: [nohiX](http://nohix.metanohi.name/) and [this
directory listing](http://projects.metanohi.name/).
## Other projects
See this listing of [git repositories](https://git.metanohi.name/).
Mostly old and unmaintained programming things. Also this website.
## Articles

1
template/base.html

@ -15,7 +15,6 @@
<ul>
<li><a href="https://github.com/nqpz">github</a></li>
<li><a href="https://media.metanohi.name/">media</a></li>
<li><a href="/misc">misc</a></li>
<li><a href="/about/">about</a></li>
</ul>
</nav>

Loading…
Cancel
Save