diff --git a/nginx/base.conf b/nginx/base.conf index 5016938..61c6fae 100644 --- a/nginx/base.conf +++ b/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/; diff --git a/scripts/transform-file.py b/scripts/transform-file.py index 2af2935..65bcd32 100755 --- a/scripts/transform-file.py +++ b/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) diff --git a/site/index.md b/site/index.md index 1328e09..0cec204 100644 --- a/site/index.md +++ b/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/). diff --git a/site/jokes.md b/site/jokes.md new file mode 100644 index 0000000..ef091d4 --- /dev/null +++ b/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. diff --git a/site/misc/index.md b/site/misc/index.md deleted file mode 100644 index f0325e2..0000000 --- a/site/misc/index.md +++ /dev/null @@ -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 - diff --git a/template/base.html b/template/base.html index 8da8da1..5d03669 100644 --- a/template/base.html +++ b/template/base.html @@ -15,7 +15,6 @@