From a48d05d1d5fcff414359c8ba6cc8f38467aebdeb Mon Sep 17 00:00:00 2001 From: Volpeon Date: Mon, 10 May 2021 16:41:05 +0200 Subject: Refactoring to fully take advantage of Make --- .gitignore | 3 +- .lua-format | 5 + Makefile | 178 ++++++++---- assets/css/_basics.scss | 11 +- assets/css/_vars.scss | 2 +- assets/css/components/_outer-button.scss | 8 +- assets/css/scopes/_body.scss | 9 +- assets/css/scopes/_headlines.scss | 12 + content/9thPK7O3xn/dre-infinite-skyscrapers.md | 45 +++ content/9thPK7O3xn/index.md | 7 + content/9thPK7O3xn/mis-design-test.md | 306 +++++++++++++++++++++ content/index.js | 6 - content/index.md | 1 + content/personal/dre-infinite-skyscrapers/index.md | 45 --- content/personal/index.md | 8 - content/personal/mis-design-test/index.md | 306 --------------------- content/profiles/index.md | 19 -- content/projects/blobfox-emojis/index.md | 6 +- content/projects/bunhd-emojis/index.md | 6 +- content/projects/index.md | 10 +- metadata/metadata.yaml | 32 +-- scripts/build_content.sh | 222 --------------- scripts/build_fonts.sh | 19 -- scripts/build_sass.sh | 6 - scripts/deploy.sh | 6 - scripts/metadata_filter.lua | 222 +++++---------- scripts/subpages.jq | 8 + scripts/watch_content.sh | 14 - scripts/watch_filters.sh | 9 - scripts/watch_metadata.sh | 9 - scripts/watch_sass.sh | 9 - scripts/watch_templates.sh | 9 - site.defaults.conf | 12 - templates/base.html | 13 +- templates/layouts/index.html | 4 +- templates/layouts/page.html | 12 +- 36 files changed, 621 insertions(+), 978 deletions(-) create mode 100644 .lua-format create mode 100644 content/9thPK7O3xn/dre-infinite-skyscrapers.md create mode 100644 content/9thPK7O3xn/index.md create mode 100644 content/9thPK7O3xn/mis-design-test.md delete mode 100644 content/index.js delete mode 100644 content/personal/dre-infinite-skyscrapers/index.md delete mode 100644 content/personal/index.md delete mode 100644 content/personal/mis-design-test/index.md delete mode 100644 content/profiles/index.md delete mode 100755 scripts/build_content.sh delete mode 100755 scripts/build_fonts.sh delete mode 100755 scripts/build_sass.sh delete mode 100755 scripts/deploy.sh create mode 100644 scripts/subpages.jq delete mode 100755 scripts/watch_content.sh delete mode 100755 scripts/watch_filters.sh delete mode 100755 scripts/watch_metadata.sh delete mode 100755 scripts/watch_sass.sh delete mode 100755 scripts/watch_templates.sh delete mode 100644 site.defaults.conf diff --git a/.gitignore b/.gitignore index dea1d0a..822ccab 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ assets/favicon/*.png assets/favicon/*.ico node_modules -output +.cache +out diff --git a/.lua-format b/.lua-format new file mode 100644 index 0000000..64a9b5c --- /dev/null +++ b/.lua-format @@ -0,0 +1,5 @@ +column_limit: 100 +align_args: false +align_parameter: false +spaces_inside_table_braces: true +extra_sep_at_table_end: true diff --git a/Makefile b/Makefile index db7db81..a42f693 100644 --- a/Makefile +++ b/Makefile @@ -1,55 +1,127 @@ -all: build +export DEPLOY_TARGET = "vulpes@94.130.78.123:/srv/http/volpeon.ink/" + +-include Env.mk + +# +# FILE GROUPS +# + +PANDOC_FILTERS := $(patsubst %,--lua-filter %,$(wildcard filters/*.lua)) +GLOBAL_METADATA := $(patsubst %,--metadata-file %,$(wildcard metadata/*.yaml)) + +CONTENT_SRC := $(shell find content -type f -name "*.md") +TEMPLATES_SRC := $(shell find templates -type f -name "*.html") +CSS_SRC := $(shell find assets/css -type f -name "*.scss") + +CONTENT_META := $(patsubst content/%.md,.cache/meta/%.json,$(CONTENT_SRC)) +CONTENT_FILES := $(patsubst content/%.md,out/%.html,$(CONTENT_SRC)) +FONT_FILES := $(patsubst assets/fonts/%.ttf,out/%.woff2,$(wildcard assets/fonts/*.ttf)) +CSS_FILES := $(patsubst assets/css/%.scss,out/%.css,$(wildcard assets/css/style.scss)) +STATIC_FILES := $(patsubst content/%,out/%,$(shell find content -type f ! -name "*.md")) + +# +# TARGETS +# + +all: content_meta content_files static_files font_files css_files + +content_meta: $(CONTENT_META) +content_files: $(CONTENT_FILES) +static_files: $(STATIC_FILES) +font_files: $(FONT_FILES) +css_files: $(CSS_FILES) + +# +# RULES +# + +.SECONDEXPANSION: + +namespace = $(patsubst %/index,%,$(patsubst %.json,%,$(patsubst $(2)%,%,$(1)))) + +subpages = $(patsubst content/%.md,.cache/meta/%.json, \ + $(shell test -d $(patsubst .cache/meta%,content%,$(1)) && find $(patsubst .cache/meta%,content%,$(1)) -maxdepth 1 -type f -name "*.md" ! -name "index.md") \ + $(shell test -d $(patsubst .cache/meta%,content%,$(1)) && find $(patsubst .cache/meta%,content%,$(1)) -mindepth 2 -maxdepth 2 -type f -name "index.md")) + +.cache/meta/%.json: content/%.md $$(call subpages,$$(call namespace,$$@,)) scripts/subpages.jq | .cache/meta + $(info [META] $< -> $@) + + mkdir -p $(@D) + $(eval PAGES_FILES = $(filter .cache/meta/%.json,$^)) + $(eval PAGES = $(shell mktemp)) + $(eval NAMESPACE = $(call namespace,$@,.cache/meta)) + $(file >$(PAGES),$(if $(PAGES_FILES),$(shell jq -s --arg namespace "$(NAMESPACE)" -f scripts/subpages.jq $(PAGES_FILES)),)) + pandoc \ + -f markdown-citations \ + -t plain \ + --no-highlight \ + --template scripts/metadata_tpl.json \ + --metadata namespace="$(NAMESPACE)" \ + --metadata file_out="$(patsubst .cache/meta/%.json,out/%.html,$@)" \ + --metadata-file "$(PAGES)" \ + -o "$@" "$<" + rm "$(PAGES)" + +out/%.html: content/%.md .cache/meta/%.json $(TEMPLATES_SRC) metadata/*.yaml filters/*.lua scripts/metadata_filter.lua | out + $(info [MARK] $< -> $@) + + mkdir -p $(@D) + pandoc \ + -f markdown-citations \ + -t html5 \ + --no-highlight \ + --template templates/base.html \ + --lua-filter scripts/metadata_filter.lua \ + $(GLOBAL_METADATA) \ + --metadata-file "$(filter .cache/meta/%.json,$^)" \ + $(PANDOC_FILTERS) \ + -o "$@" "$<" + +out/%: content/% | out + $(info [COPY] $< -> $@) + + mkdir -p $(@D) + cp "$<" "$@" + +out/%.woff2: assets/fonts/%.ttf assets/fonts/glyphs.txt | out + $(info [FONT] $< -> $@) + + pyftsubset "$<" \ + --text-file="assets/fonts/glyphs.txt" \ + --layout-features+=ss02,ss09,dlig \ + --flavor="woff2" \ + --output-file="$@" + +out/%.css: assets/css/%.scss $(CSS_SRC) | out + $(info [SCSS] $< -> $@) + + sassc -t compressed "$<" | ./node_modules/.bin/postcss --use autoprefixer --no-map > "$@" + +.cache/meta: .cache + mkdir -p .cache/meta + +.cache/pages: .cache + mkdir -p .cache/pages + +.cache: + mkdir -p .cache + +out: + mkdir -p out + +# +# UTILITIES +# + +compress: all + pigz -R -k -9 -- `find out -type f -iregex '.*\\.\\(css\\|js\\|json\\|html\\|xml\\|txt\\|svg\\|ico\\)'` + brotli -k -- `find out -type f -iregex '.*\\.\\(css\\|js\\|json\\|html\\|xml\\|txt\\|svg\\|ico\\|woff\\)'` + +serve: all + python -m http.server --directory out 8000 + +#deploy: compress +# rsync --progress --stats -rvz --delete out "$(DEPLOY_TARGET)" clean: - @mkdir -p output - @rm -rf output/* - -build_fonts: clean - @scripts/build_fonts.sh - -build_sass: clean - @scripts/build_sass.sh - -build_content: clean - @scripts/build_content.sh - -build_only: build_fonts build_sass build_content - -compress_gz: build_only - @echo -e "\033[0;32m[COMPRESS]\033[0m Gzip" - @pigz -R -k -9 -- `find output -type f -iregex '.*\\.\\(css\\|js\\|json\\|html\\|xml\\|txt\\|svg\\|ico\\)'` - -compress_br: build_only - @echo -e "\033[0;32m[COMPRESS]\033[0m Brotli" - @brotli -k -- `find output -type f -iregex '.*\\.\\(css\\|js\\|json\\|html\\|xml\\|txt\\|svg\\|ico\\|woff\\)'` - -build: export LIVE=false -build: compress_gz compress_br - -watch_sass: build_only - @scripts/watch_sass.sh - -watch_content: build_only - @scripts/watch_content.sh - -watch_templates: build_only - @scripts/watch_templates.sh - -watch_metadata: build_only - @scripts/watch_metadata.sh - -watch_filters: build_only - @scripts/watch_filters.sh - -watch: export LIVE=true -watch: watch_sass watch_content watch_templates watch_metadata watch_filters - -serve_only: build_only - @python -m http.server --bind 127.0.0.1 --directory output - -serve: watch serve_only - -deploy: build - @scripts/deploy.sh - -.PHONY: all clean build watch serve deploy + rm -rf out diff --git a/assets/css/_basics.scss b/assets/css/_basics.scss index b2a437b..573167c 100644 --- a/assets/css/_basics.scss +++ b/assets/css/_basics.scss @@ -138,13 +138,10 @@ h3, h4, h5, h6 { - margin: ($line-height * 2rem) 0 0; - color: var(--heading--fg); - font-family: $font-fam--large; - font-size: 1em; - font-weight: 600; - line-height: 1.4; - font-feature-settings: 'ss02' 1; + margin: ($line-height * 2rem) 0 0; + color: var(--heading--fg); + font-size: 1em; + font-weight: 700; & + & { margin-top: $line-height * 1rem; diff --git a/assets/css/_vars.scss b/assets/css/_vars.scss index 3adce04..0df3a61 100644 --- a/assets/css/_vars.scss +++ b/assets/css/_vars.scss @@ -14,7 +14,7 @@ $unit-intervals: ( $responsive-mod-scale: ( xs: (.8rem, 1.35), - md: (.8rem, 1.58) + md: (.8rem, 1.53) ); $font-fam--text: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif; diff --git a/assets/css/components/_outer-button.scss b/assets/css/components/_outer-button.scss index 22fa251..e54c83d 100644 --- a/assets/css/components/_outer-button.scss +++ b/assets/css/components/_outer-button.scss @@ -24,7 +24,8 @@ transition: background-color .2s, color .2s; background-color: prop(--colors --bg); color: prop(--colors --fg); - font-size: 1 / 16 * 15rem; + font-size: 1rem; + font-weight: 700; letter-spacing: 1px; text-decoration: none; text-transform: uppercase; @@ -51,8 +52,8 @@ @include element('icon-symbol') { display: block; - width: 1.45em; - height: 1.45em; + width: 1.5em; + height: 1.5em; } @include element('content') { @@ -60,6 +61,7 @@ padding-right: prop(--dims --pad-x); padding-left: prop(--dims --pad-x); transition: border-color .2s; + font-size: 1 / 16 * 14em; line-height: prop(--dims --outer, $global: true); white-space: nowrap; } diff --git a/assets/css/scopes/_body.scss b/assets/css/scopes/_body.scss index 8e5f876..96231ad 100644 --- a/assets/css/scopes/_body.scss +++ b/assets/css/scopes/_body.scss @@ -11,12 +11,11 @@ font-size: 1 / 16 * 19em; @include element('meta') { - margin-top: $line-height * 1rem; - color: prop(--colors --meta --fg); - font-size: 1 / 16 * 15rem; + color: prop(--colors --meta --fg); + font-size: 1 / 16 * 15rem; - + * { - margin-top: $line-height * 1.5rem; + + h1 { + margin-top: $line-height * .5rem; } } diff --git a/assets/css/scopes/_headlines.scss b/assets/css/scopes/_headlines.scss index 6b28e9c..8b75708 100644 --- a/assets/css/scopes/_headlines.scss +++ b/assets/css/scopes/_headlines.scss @@ -8,6 +8,18 @@ )); @include scope(namespace()) { + h1, + h2, + h3, + h4, + h5, + h6 { + font-family: $font-fam--large; + font-weight: 600; + line-height: 1.4; + font-feature-settings: 'ss02' 1; + } + h1, h2, h3, diff --git a/content/9thPK7O3xn/dre-infinite-skyscrapers.md b/content/9thPK7O3xn/dre-infinite-skyscrapers.md new file mode 100644 index 0000000..32f34ab --- /dev/null +++ b/content/9thPK7O3xn/dre-infinite-skyscrapers.md @@ -0,0 +1,45 @@ +--- +date: 2021-01-09 +title: Infinite Skyscrapers +category: dreams +--- + +I'm in some strange world that consist of huge buildings, looking a lot like very simple skyscrapers, except they were all interconnected. +I'm not even sure if there's a floor since I'm just floating, being able to fly around at will. +There is also something chasing me and I'm trying to get away from it. + +The buildings around me get denser and more chaotic, some look like glitches in a computer game. +The creature chasing me seems to absorb buildings into its body, growing larger and more powerful. + +Then there's a cut and I'm presumably inside one of those buildings. +I'm in a dark room with barely any lighting which looks somewhat like a large office. +It's very cluttered, though. +There's another similar room next to this one, separated by a glass wall and a door. +There's also a person with me who I seem to know, and that creature that chased me. +It seems like it managed to capture us. + +It dares us to escape from this situation, and as soon as it said that, the room begins to get locked off. +There are some red lights blinking and the door connecting our current room with the neighboring room is about to close permanently. +Panicked, I quickly run through it, but the other person couldn't make it. + +I suddenly realize I'm a cat and the other person an even smaller critter, I don't know what. +It's obvious that the creature is just playing with us, watching our futile efforts to escape for its amusement. + +The other person tries to get the door to open again by messing with its circuitry, and I do my best to block the creature's view from what was going on without looking suspicious. + +After a while, I start exploring the room and notice that there's a hallway in front of it, also separated by a glass wall and a door. +However, the wall is broken in one place and has a hole large enough for me to jump through. +So that's what I do. +I land in a bunch of glass disks lying on the floor, breaking them, but I'm unharmed. + +Now being a human again, I take a glass shard with me and run through a door which leads to a staircase. +It is huge, having the shape of a pill with stairs going along the edge. +The center is empty so I can see all the floors coming before and after. +There's no end in any direction. +I know the creature will come after me soon and so I run upwards as fast as I can. + +I made it about 5 floors when I hear a door burst open. +I quickly enter the room next to me, hoping that the creature hasn't seen me. + +This floor was very large and open and brightly lit. +The dream starts to make no sense anymore and that's it. diff --git a/content/9thPK7O3xn/index.md b/content/9thPK7O3xn/index.md new file mode 100644 index 0000000..2545092 --- /dev/null +++ b/content/9thPK7O3xn/index.md @@ -0,0 +1,7 @@ +--- +title: Personal +layout: categorized_list +--- + +Welcome to the personal section of my website! +Here you can find content I don't want to be easily accessible for all visitors, which is why I haven't linked this section anywhere. diff --git a/content/9thPK7O3xn/mis-design-test.md b/content/9thPK7O3xn/mis-design-test.md new file mode 100644 index 0000000..687d215 --- /dev/null +++ b/content/9thPK7O3xn/mis-design-test.md @@ -0,0 +1,306 @@ +--- +title: "Design Test: Markdown Syntax" +category: misc +--- + +- [Overview](#overview) + - [Philosophy](#philosophy) +- [Block Elements](#block-elements) + - [Paragraphs and Line Breaks](#paragraphs-and-line-breaks) + - [Headers](#headers) + - [Blockquotes](#blockquotes) + - [Lists](#lists) + - [Code Blocks](#code-blocks) +- [Span Elements](#span-elements) + - [Links](#links) + - [Emphasis](#emphasis) + - [Code](#code) + + +**Note:** This document is itself written using Markdown; you +can [see the source for it by adding '.text' to the URL](/projects/markdown/syntax.text). + +---- + +## Overview + +### Philosophy + +Markdown is intended to be as easy-to-read and easy-to-write as is feasible. + +Readability, however, is emphasized above all else. A Markdown-formatted +document should be publishable as-is, as plain text, without looking +like it's been marked up with tags or formatting instructions. While +Markdown's syntax has been influenced by several existing text-to-HTML +filters -- including [Setext](http://docutils.sourceforge.net/mirror/setext.html), [atx](http://www.aaronsw.com/2002/atx/), [Textile](http://textism.com/tools/textile/), [reStructuredText](http://docutils.sourceforge.net/rst.html), +[Grutatext](http://www.triptico.com/software/grutatxt.html), and [EtText](http://ettext.taint.org/doc/) -- the single biggest source of +inspiration for Markdown's syntax is the format of plain text email. + +## Block Elements + +### Paragraphs and Line Breaks + +A paragraph is simply one or more consecutive lines of text, separated +by one or more blank lines. (A blank line is any line that looks like a +blank line -- a line containing nothing but spaces or tabs is considered +blank.) Normal paragraphs should not be indented with spaces or tabs. + +The implication of the "one or more consecutive lines of text" rule is +that Markdown supports "hard-wrapped" text paragraphs. This differs +significantly from most other text-to-HTML formatters (including Movable +Type's "Convert Line Breaks" option) which translate every line break +character in a paragraph into a `
` tag. + +When you *do* want to insert a `
` break tag using Markdown, you +end a line with two or more spaces, then type return. + +### Headers + +Markdown supports two styles of headers, [Setext] [1] and [atx] [2]. + +Optionally, you may "close" atx-style headers. This is purely +cosmetic -- you can use this if you think it looks better. The +closing hashes don't even need to match the number of hashes +used to open the header. (The number of opening hashes +determines the header level.) + + +### Blockquotes + +Markdown uses email-style `>` characters for blockquoting. If you're +familiar with quoting passages of text in an email message, then you +know how to create a blockquote in Markdown. It looks best if you hard +wrap the text and put a `>` before every line: + +> This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet, +> consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. +> Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. +> +> Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse +> id sem consectetuer libero luctus adipiscing. + +Markdown allows you to be lazy and only put the `>` before the first +line of a hard-wrapped paragraph: + +> This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet, +consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. +Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. + +> Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse +id sem consectetuer libero luctus adipiscing. + +Blockquotes can be nested (i.e. a blockquote-in-a-blockquote) by +adding additional levels of `>`: + +> This is the first level of quoting. +> +> > This is nested blockquote. +> +> Back to the first level. + +Blockquotes can contain other Markdown elements, including headers, lists, +and code blocks: + +> ## This is a header. +> +> 1. This is the first list item. +> 2. This is the second list item. +> +> Here's some example code: +> +> return shell_exec("echo $input | $markdown_script"); + +Any decent text editor should make email-style quoting easy. For +example, with BBEdit, you can make a selection and choose Increase +Quote Level from the Text menu. + + +### Lists + +Markdown supports ordered (numbered) and unordered (bulleted) lists. + +Unordered lists use asterisks, pluses, and hyphens -- interchangably +-- as list markers: + +* Red +* Green +* Blue + +is equivalent to: + ++ Red ++ Green ++ Blue + +and: + +- Red +- Green +- Blue + +Ordered lists use numbers followed by periods: + +1. Bird +2. McHale +3. Parish + +It's important to note that the actual numbers you use to mark the +list have no effect on the HTML output Markdown produces. The HTML +Markdown produces from the above list is: + +If you instead wrote the list in Markdown like this: + +1. Bird +1. McHale +1. Parish + +or even: + +3. Bird +1. McHale +8. Parish + +you'd get the exact same HTML output. The point is, if you want to, +you can use ordinal numbers in your ordered Markdown lists, so that +the numbers in your source match the numbers in your published HTML. +But if you want to be lazy, you don't have to. + +To make lists look nice, you can wrap items with hanging indents: + +* Lorem ipsum dolor sit amet, consectetuer adipiscing elit. + Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, + viverra nec, fringilla in, laoreet vitae, risus. +* Donec sit amet nisl. Aliquam semper ipsum sit amet velit. + Suspendisse id sem consectetuer libero luctus adipiscing. + +But if you want to be lazy, you don't have to: + +* Lorem ipsum dolor sit amet, consectetuer adipiscing elit. +Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, +viverra nec, fringilla in, laoreet vitae, risus. +* Donec sit amet nisl. Aliquam semper ipsum sit amet velit. +Suspendisse id sem consectetuer libero luctus adipiscing. + +List items may consist of multiple paragraphs. Each subsequent +paragraph in a list item must be indented by either 4 spaces +or one tab: + +1. This is a list item with two paragraphs. Lorem ipsum dolor + sit amet, consectetuer adipiscing elit. Aliquam hendrerit + mi posuere lectus. + + Vestibulum enim wisi, viverra nec, fringilla in, laoreet + vitae, risus. Donec sit amet nisl. Aliquam semper ipsum + sit amet velit. + +2. Suspendisse id sem consectetuer libero luctus adipiscing. + +It looks nice if you indent every line of the subsequent +paragraphs, but here again, Markdown will allow you to be +lazy: + +* This is a list item with two paragraphs. + + This is the second paragraph in the list item. You're +only required to indent the first line. Lorem ipsum dolor +sit amet, consectetuer adipiscing elit. + +* Another item in the same list. + +To put a blockquote within a list item, the blockquote's `>` +delimiters need to be indented: + +* A list item with a blockquote: + + > This is a blockquote + > inside a list item. + +To put a code block within a list item, the code block needs +to be indented *twice* -- 8 spaces or two tabs: + +* A list item with a code block: + + + +### Code Blocks + +Pre-formatted code blocks are used for writing about programming or +markup source code. Rather than forming normal paragraphs, the lines +of a code block are interpreted literally. Markdown wraps a code block +in both `
` and `` tags.
+
+To produce a code block in Markdown, simply indent every line of the
+block by at least 4 spaces or 1 tab.
+
+This is a normal paragraph:
+
+    This is a code block.
+
+Here is an example of AppleScript:
+
+    tell application "Foo"
+        beep
+    end tell
+
+A code block continues until it reaches a line that is not indented
+(or the end of the article).
+
+Within a code block, ampersands (`&`) and angle brackets (`<` and `>`)
+are automatically converted into HTML entities. This makes it very
+easy to include example HTML source code using Markdown -- just paste
+it and indent it, and Markdown will handle the hassle of encoding the
+ampersands and angle brackets. For example, this:
+
+    
+
+Regular Markdown syntax is not processed within code blocks. E.g.,
+asterisks are just literal asterisks within a code block. This means
+it's also easy to use Markdown to write about Markdown's own syntax.
+
+```
+tell application "Foo"
+    beep
+end tell
+```
+
+## Span Elements
+
+### Links
+
+Markdown supports two style of links: *inline* and *reference*.
+
+In both styles, the link text is delimited by [square brackets].
+
+To create an inline link, use a set of regular parentheses immediately
+after the link text's closing square bracket. Inside the parentheses,
+put the URL where you want the link to point, along with an *optional*
+title for the link, surrounded in quotes. For example:
+
+This is [an example](http://example.com/) inline link.
+
+[This link](http://example.net/) has no title attribute.
+
+### Emphasis
+
+Markdown treats asterisks (`*`) and underscores (`_`) as indicators of
+emphasis. Text wrapped with one `*` or `_` will be wrapped with an
+HTML `` tag; double `*`'s or `_`'s will be wrapped with an HTML
+`` tag. E.g., this input:
+
+*single asterisks*
+
+_single underscores_
+
+**double asterisks**
+
+__double underscores__
+
+### Code
+
+To indicate a span of code, wrap it with backtick quotes (`` ` ``).
+Unlike a pre-formatted code block, a code span indicates code within a
+normal paragraph. For example:
+
+Use the `printf()` function.
diff --git a/content/index.js b/content/index.js
deleted file mode 100644
index e03dec1..0000000
--- a/content/index.js
+++ /dev/null
@@ -1,6 +0,0 @@
-var headerEl = document.querySelector(".c-hero");
-var headerTemplateEl = document.getElementById("header-sm");
-var headerSmEl = headerTemplateEl.content.cloneNode("true");
-
-headerEl.classList.remove("u-dn@sm-down");
-headerEl.appendChild(headerSmEl);
diff --git a/content/index.md b/content/index.md
index e144d39..1d9b360 100644
--- a/content/index.md
+++ b/content/index.md
@@ -1,3 +1,4 @@
 ---
 title: Home
 ---
+ 
\ No newline at end of file
diff --git a/content/personal/dre-infinite-skyscrapers/index.md b/content/personal/dre-infinite-skyscrapers/index.md
deleted file mode 100644
index ca30329..0000000
--- a/content/personal/dre-infinite-skyscrapers/index.md
+++ /dev/null
@@ -1,45 +0,0 @@
----
-date:     2021-01-09
-title:    Infinite Skyscrapers
-category: dre
----
-
-I'm in some strange world that consist of huge buildings, looking a lot like very simple skyscrapers, except they were all interconnected.
-I'm not even sure if there's a floor since I'm just floating, being able to fly around at will.
-There is also something chasing me and I'm trying to get away from it.
-
-The buildings around me get denser and more chaotic, some look like glitches in a computer game.
-The creature chasing me seems to absorb buildings into its body, growing larger and more powerful.
-
-Then there's a cut and I'm presumably inside one of those buildings.
-I'm in a dark room with barely any lighting which looks somewhat like a large office.
-It's very cluttered, though.
-There's another similar room next to this one, separated by a glass wall and a door.
-There's also a person with me who I seem to know, and that creature that chased me.
-It seems like it managed to capture us.
-
-It dares us to escape from this situation, and as soon as it said that, the room begins to get locked off.
-There are some red lights blinking and the door connecting our current room with the neighboring room is about to close permanently.
-Panicked, I quickly run through it, but the other person couldn't make it.
-
-I suddenly realize I'm a cat and the other person an even smaller critter, I don't know what.
-It's obvious that the creature is just playing with us, watching our futile efforts to escape for its amusement.
-
-The other person tries to get the door to open again by messing with its circuitry, and I do my best to block the creature's view from what was going on without looking suspicious.
-
-After a while, I start exploring the room and notice that there's a hallway in front of it, also separated by a glass wall and a door.
-However, the wall is broken in one place and has a hole large enough for me to jump through.
-So that's what I do.
-I land in a bunch of glass disks lying on the floor, breaking them, but I'm unharmed.
-
-Now being a human again, I take a glass shard with me and run through a door which leads to a staircase.
-It is huge, having the shape of a pill with stairs going along the edge.
-The center is empty so I can see all the floors coming before and after.
-There's no end in any direction.
-I know the creature will come after me soon and so I run upwards as fast as I can.
-
-I made it about 5 floors when I hear a door burst open.
-I quickly enter the room next to me, hoping that the creature hasn't seen me.
-
-This floor was very large and open and brightly lit.
-The dream starts to make no sense anymore and that's it.
diff --git a/content/personal/index.md b/content/personal/index.md
deleted file mode 100644
index dd7423d..0000000
--- a/content/personal/index.md
+++ /dev/null
@@ -1,8 +0,0 @@
----
-title: Personal
-layout: categorized_list
-create_feed: true
----
-
-Welcome to the personal section of my website!
-Here you can find content I don't want to be easily accessible for all visitors, which is why I haven't linked this section anywhere.
diff --git a/content/personal/mis-design-test/index.md b/content/personal/mis-design-test/index.md
deleted file mode 100644
index c31e42d..0000000
--- a/content/personal/mis-design-test/index.md
+++ /dev/null
@@ -1,306 +0,0 @@
----
-title:    "Design Test: Markdown Syntax"
-category: mis
----
-
-- [Overview](#overview)
-  - [Philosophy](#philosophy)
-- [Block Elements](#block-elements)
-  - [Paragraphs and Line Breaks](#paragraphs-and-line-breaks)
-  - [Headers](#headers)
-  - [Blockquotes](#blockquotes)
-  - [Lists](#lists)
-  - [Code Blocks](#code-blocks)
-- [Span Elements](#span-elements)
-  - [Links](#links)
-  - [Emphasis](#emphasis)
-  - [Code](#code)
-
-
-**Note:** This document is itself written using Markdown; you
-can [see the source for it by adding '.text' to the URL](/projects/markdown/syntax.text).
-
-----
-
-## Overview
-
-### Philosophy
-
-Markdown is intended to be as easy-to-read and easy-to-write as is feasible.
-
-Readability, however, is emphasized above all else. A Markdown-formatted
-document should be publishable as-is, as plain text, without looking
-like it's been marked up with tags or formatting instructions. While
-Markdown's syntax has been influenced by several existing text-to-HTML
-filters -- including [Setext](http://docutils.sourceforge.net/mirror/setext.html), [atx](http://www.aaronsw.com/2002/atx/), [Textile](http://textism.com/tools/textile/), [reStructuredText](http://docutils.sourceforge.net/rst.html),
-[Grutatext](http://www.triptico.com/software/grutatxt.html), and [EtText](http://ettext.taint.org/doc/) -- the single biggest source of
-inspiration for Markdown's syntax is the format of plain text email.
-
-## Block Elements
-
-### Paragraphs and Line Breaks
-
-A paragraph is simply one or more consecutive lines of text, separated
-by one or more blank lines. (A blank line is any line that looks like a
-blank line -- a line containing nothing but spaces or tabs is considered
-blank.) Normal paragraphs should not be indented with spaces or tabs.
-
-The implication of the "one or more consecutive lines of text" rule is
-that Markdown supports "hard-wrapped" text paragraphs. This differs
-significantly from most other text-to-HTML formatters (including Movable
-Type's "Convert Line Breaks" option) which translate every line break
-character in a paragraph into a `
` tag. - -When you *do* want to insert a `
` break tag using Markdown, you -end a line with two or more spaces, then type return. - -### Headers - -Markdown supports two styles of headers, [Setext] [1] and [atx] [2]. - -Optionally, you may "close" atx-style headers. This is purely -cosmetic -- you can use this if you think it looks better. The -closing hashes don't even need to match the number of hashes -used to open the header. (The number of opening hashes -determines the header level.) - - -### Blockquotes - -Markdown uses email-style `>` characters for blockquoting. If you're -familiar with quoting passages of text in an email message, then you -know how to create a blockquote in Markdown. It looks best if you hard -wrap the text and put a `>` before every line: - -> This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet, -> consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. -> Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. -> -> Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse -> id sem consectetuer libero luctus adipiscing. - -Markdown allows you to be lazy and only put the `>` before the first -line of a hard-wrapped paragraph: - -> This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet, -consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. -Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. - -> Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse -id sem consectetuer libero luctus adipiscing. - -Blockquotes can be nested (i.e. a blockquote-in-a-blockquote) by -adding additional levels of `>`: - -> This is the first level of quoting. -> -> > This is nested blockquote. -> -> Back to the first level. - -Blockquotes can contain other Markdown elements, including headers, lists, -and code blocks: - -> ## This is a header. -> -> 1. This is the first list item. -> 2. This is the second list item. -> -> Here's some example code: -> -> return shell_exec("echo $input | $markdown_script"); - -Any decent text editor should make email-style quoting easy. For -example, with BBEdit, you can make a selection and choose Increase -Quote Level from the Text menu. - - -### Lists - -Markdown supports ordered (numbered) and unordered (bulleted) lists. - -Unordered lists use asterisks, pluses, and hyphens -- interchangably --- as list markers: - -* Red -* Green -* Blue - -is equivalent to: - -+ Red -+ Green -+ Blue - -and: - -- Red -- Green -- Blue - -Ordered lists use numbers followed by periods: - -1. Bird -2. McHale -3. Parish - -It's important to note that the actual numbers you use to mark the -list have no effect on the HTML output Markdown produces. The HTML -Markdown produces from the above list is: - -If you instead wrote the list in Markdown like this: - -1. Bird -1. McHale -1. Parish - -or even: - -3. Bird -1. McHale -8. Parish - -you'd get the exact same HTML output. The point is, if you want to, -you can use ordinal numbers in your ordered Markdown lists, so that -the numbers in your source match the numbers in your published HTML. -But if you want to be lazy, you don't have to. - -To make lists look nice, you can wrap items with hanging indents: - -* Lorem ipsum dolor sit amet, consectetuer adipiscing elit. - Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, - viverra nec, fringilla in, laoreet vitae, risus. -* Donec sit amet nisl. Aliquam semper ipsum sit amet velit. - Suspendisse id sem consectetuer libero luctus adipiscing. - -But if you want to be lazy, you don't have to: - -* Lorem ipsum dolor sit amet, consectetuer adipiscing elit. -Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, -viverra nec, fringilla in, laoreet vitae, risus. -* Donec sit amet nisl. Aliquam semper ipsum sit amet velit. -Suspendisse id sem consectetuer libero luctus adipiscing. - -List items may consist of multiple paragraphs. Each subsequent -paragraph in a list item must be indented by either 4 spaces -or one tab: - -1. This is a list item with two paragraphs. Lorem ipsum dolor - sit amet, consectetuer adipiscing elit. Aliquam hendrerit - mi posuere lectus. - - Vestibulum enim wisi, viverra nec, fringilla in, laoreet - vitae, risus. Donec sit amet nisl. Aliquam semper ipsum - sit amet velit. - -2. Suspendisse id sem consectetuer libero luctus adipiscing. - -It looks nice if you indent every line of the subsequent -paragraphs, but here again, Markdown will allow you to be -lazy: - -* This is a list item with two paragraphs. - - This is the second paragraph in the list item. You're -only required to indent the first line. Lorem ipsum dolor -sit amet, consectetuer adipiscing elit. - -* Another item in the same list. - -To put a blockquote within a list item, the blockquote's `>` -delimiters need to be indented: - -* A list item with a blockquote: - - > This is a blockquote - > inside a list item. - -To put a code block within a list item, the code block needs -to be indented *twice* -- 8 spaces or two tabs: - -* A list item with a code block: - - - -### Code Blocks - -Pre-formatted code blocks are used for writing about programming or -markup source code. Rather than forming normal paragraphs, the lines -of a code block are interpreted literally. Markdown wraps a code block -in both `
` and `` tags.
-
-To produce a code block in Markdown, simply indent every line of the
-block by at least 4 spaces or 1 tab.
-
-This is a normal paragraph:
-
-    This is a code block.
-
-Here is an example of AppleScript:
-
-    tell application "Foo"
-        beep
-    end tell
-
-A code block continues until it reaches a line that is not indented
-(or the end of the article).
-
-Within a code block, ampersands (`&`) and angle brackets (`<` and `>`)
-are automatically converted into HTML entities. This makes it very
-easy to include example HTML source code using Markdown -- just paste
-it and indent it, and Markdown will handle the hassle of encoding the
-ampersands and angle brackets. For example, this:
-
-    
-
-Regular Markdown syntax is not processed within code blocks. E.g.,
-asterisks are just literal asterisks within a code block. This means
-it's also easy to use Markdown to write about Markdown's own syntax.
-
-```
-tell application "Foo"
-    beep
-end tell
-```
-
-## Span Elements
-
-### Links
-
-Markdown supports two style of links: *inline* and *reference*.
-
-In both styles, the link text is delimited by [square brackets].
-
-To create an inline link, use a set of regular parentheses immediately
-after the link text's closing square bracket. Inside the parentheses,
-put the URL where you want the link to point, along with an *optional*
-title for the link, surrounded in quotes. For example:
-
-This is [an example](http://example.com/) inline link.
-
-[This link](http://example.net/) has no title attribute.
-
-### Emphasis
-
-Markdown treats asterisks (`*`) and underscores (`_`) as indicators of
-emphasis. Text wrapped with one `*` or `_` will be wrapped with an
-HTML `` tag; double `*`'s or `_`'s will be wrapped with an HTML
-`` tag. E.g., this input:
-
-*single asterisks*
-
-_single underscores_
-
-**double asterisks**
-
-__double underscores__
-
-### Code
-
-To indicate a span of code, wrap it with backtick quotes (`` ` ``).
-Unlike a pre-formatted code block, a code span indicates code within a
-normal paragraph. For example:
-
-Use the `printf()` function.
diff --git a/content/profiles/index.md b/content/profiles/index.md
deleted file mode 100644
index 9a9d7fa..0000000
--- a/content/profiles/index.md
+++ /dev/null
@@ -1,19 +0,0 @@
----
-title: Profiles
----
-
-- **Bandcamp:** [volpeon](https://bandcamp.com/volpeon)
-- **Email:** me@volpeon.ink
-- **Fediverse:** @volpeon@fedi.vulpes.one
-- **GitHub:** [volpeon](https://github.com/volpeon)
-- **IRC:** volpeon on [Furnet](irc://irc.furnet.org), [Freenode](ircs://chat.freenode.net), [irc.vulpes.one](ircs://irc.vulpes.one)
-- **PeerTube:** @volpeon@pt.vulpes.one
-- **Steam:** [volpeon](https://steamcommunity.com/id/volpeon/)
-- **XMPP:** <available>
-
-## OMEMO Fingerprints
-
-```plain
-CB07051B E223EF70 8EE8F665 BBFCEF00 83415C45 DCA31906 F2362543 F5543449
-C2C575EE 0236965C 4DBAA7EA 12F9EC90 AFD57B2C F75B3F32 70F3D393 2EDA3A08
-```
diff --git a/content/projects/blobfox-emojis/index.md b/content/projects/blobfox-emojis/index.md
index 44fd1e7..5a4fff1 100644
--- a/content/projects/blobfox-emojis/index.md
+++ b/content/projects/blobfox-emojis/index.md
@@ -1,7 +1,7 @@
 ---
-title: Blobfox
-category: emj
-preview: preview.jpg
+title:    Blobfox
+category: emojis
+preview:  preview.jpg
 ---
 
 ![](screenshot.png)
diff --git a/content/projects/bunhd-emojis/index.md b/content/projects/bunhd-emojis/index.md
index 75d4b3f..94278c1 100644
--- a/content/projects/bunhd-emojis/index.md
+++ b/content/projects/bunhd-emojis/index.md
@@ -1,7 +1,7 @@
 ---
-title: BunHD
-category: emj
-preview: preview.png
+title:    BunHD
+category: emojis
+preview:  preview.png
 ---
 
 ![](screenshot.png)
diff --git a/content/projects/index.md b/content/projects/index.md
index 7316d55..1a33149 100644
--- a/content/projects/index.md
+++ b/content/projects/index.md
@@ -1,12 +1,4 @@
 ---
-title: Projects
+title:  Projects
 layout: categorized_list
 ---
-
-## Web services
-
-::: {macro=refs}
-- [Gopher + Gemini Proxy](//proxy.vulpes.one/)
-- [IRC Web Client](//irc.vulpes.one/)
-- [PeerTube Livestream Chat](//lsirc.vulpes.one/)
-:::
diff --git a/metadata/metadata.yaml b/metadata/metadata.yaml
index 86b5c66..78cb1e8 100644
--- a/metadata/metadata.yaml
+++ b/metadata/metadata.yaml
@@ -7,38 +7,28 @@ author:
 
 menus:
   main:
-    - id:         projects
-      label:      Projects
-      url:        /#projects
+    - id:     projects
+      label:  Projects
+      url:    /#projects
 
-    - id:         personal
-      label:      Personal
-      label_long: Personal Notebook
-      url:        /personal/
-      hidden:     true
-
-feeds:
-  - title: Notebook
-    url: /notebook/index.xml
+    - id:     9thPK7O3xn
+      label:  Personal
+      url:    /9thPK7O3xn/
+      hidden: true
 
 categories:
-  personal:
-    dre:
+  9thPK7O3xn:
+    dreams:
       name:      Dream Journal
       show_date: true
-    mis:
+    misc:
       name: Sonstiges
       
   projects:
-    emj:
+    emojis:
       name: Emojis
       icon: smile
 
-rewrites:
-  path:
-    - from: ^/personal
-      to:   /9thPK7O3xn
-
 profiles:
   - platform: Bandcamp
     icon:     parallelogram
diff --git a/scripts/build_content.sh b/scripts/build_content.sh
deleted file mode 100755
index 3dea44f..0000000
--- a/scripts/build_content.sh
+++ /dev/null
@@ -1,222 +0,0 @@
-#!/bin/bash
-
-source "site.defaults.conf"
-
-get_filters() {
-    local filters_args=""
-
-    mapfile -d $'\0' filters < <(find $FILTERS_DIR \
-        -type f \
-        -name "*.lua" ! -name ".*" \
-        -print0)
-
-    for file in "${filters[@]}"; do
-        filters_args="$filters_args --lua-filter $file"
-    done
-
-    echo "$filters_args"
-}
-
-FILTERS=$(get_filters)
-
-get_filename_out() {
-    local filename=$1
-    filename=${filename#"$CONTENT_DIR"}
-    echo "$OUTPUT_DIR$filename"
-}
-
-get_metadata() {
-    pandoc "$1" \
-        -f markdown-citations \
-        -t plain \
-        --metadata content_dir="$CONTENT_DIR" \
-        --metadata file_in="$1" \
-        --metadata relative_to="$2" \
-        --metadata-file metadata/metadata.yaml \
-        --no-highlight \
-        --template scripts/metadata_tpl.json \
-        --lua-filter scripts/metadata_filter.lua
-}
-
-get_content() {
-    pandoc "$1" \
-        -f markdown-citations \
-        -t markdown \
-        --metadata content_dir="$CONTENT_DIR" \
-        --metadata file_in="$1" \
-        --metadata-file metadata/metadata.yaml \
-        --no-highlight \
-        --lua-filter scripts/metadata_filter.lua
-}
-
-get_subpages_metadata() {
-    local base_dir_in=${1%/index.md}
-    local relative_to="$2"
-    if [ -z "$2" ]; then
-        relative_to="$1"
-    fi
-    local child_pages=()
-
-    if [ -d "$base_dir_in" ]; then
-        mapfile -d $'\0' child_pages < <(find "$base_dir_in" \
-            -maxdepth 2 \
-            -type f \
-            -wholename "$base_dir_in/*/index.md" \
-            ! -name "_*.md" \
-            -print0)
-    fi
-
-    local pages="[]"
-    local subsections="{}"
-
-    for file_in in "${child_pages[@]}"; do
-        local subsection=$(basename "${file_in%/index.md}")
-        local content=$(get_content "$file_in" | sed -z 's/\\/\\\\/g;s/\n/\\n/g;s/"/\\"/g')
-        local metadata=$(get_metadata "$file_in" | jq "{ \
-            file_out: .file_out, \
-            url: .url, \
-            author: .author, \
-            title: .title, \
-            date: .date, \
-            last_update: .last_update, \
-            category: .category, \
-            preview: .preview, \
-            content: \"$content\" \
-        } | del(.[] | nulls)")
-        local title=$(echo "$metadata" | jq ".title")
-        local subpages="[]"
-
-        if [ -z "$2" ]; then
-            subpages=$(get_subpages_metadata "$file_in" "$1" | jq ".pages")
-        fi
-
-        pages=$(echo "$pages" | jq ". += [ $metadata ]")
-        subsections=$(echo "$subsections" | jq ". += { \"$subsection\": { title: $title, pages: $subpages } }")
-    done
-
-    echo "{ \"pages\": $pages, \"subsections\": $subsections }"
-}
-
-handle () {
-    if [ "${1#*.}" = "md" ]; then
-        local included_metadata=$(get_metadata "$1")
-        local file_out=$(echo "$included_metadata" | jq -r .file_out)
-        file_out="$OUTPUT_DIR${file_out#/}"
-        local create_feed=$(echo "$included_metadata" | jq -r .create_feed)
-
-        mkdir -p $(dirname "$file_out")
-
-        echo -e "\033[0;32m[COMPILE ]\033[0m $1 -> $file_out"
-
-        echo -e "\033[0;90m[COMPILE ]\033[0m     Getting subpages"
-
-        local added_metadata=$(get_subpages_metadata "$1")
-
-        local meta_file=$(mktemp)
-
-        echo "$added_metadata" > "$meta_file"
-            
-        if [ "$create_feed" = "true" ]; then
-            echo -e "\033[0;90m[COMPILE ]\033[0m     Creating feed"
-
-            pandoc "$1" \
-                -f markdown-citations \
-                -t html5 \
-                --no-highlight \
-                --template "${TEMPLATES_DIR}feed.xml" \
-                -o "${file_out%.html}.xml" \
-                --metadata content_dir="$CONTENT_DIR" \
-                --metadata file_in="$1" \
-                --metadata page_type=feed \
-                --metadata-file metadata/metadata.yaml \
-                --metadata-file "$meta_file" \
-                --lua-filter scripts/metadata_filter.lua
-        fi
-
-        echo -e "\033[0;90m[COMPILE ]\033[0m     Creating page"
-
-        pandoc "$1" \
-            -f markdown-citations \
-            -t html5 \
-            --no-highlight \
-            --template "${TEMPLATES_DIR}base.html" \
-            -o "$file_out" \
-            --metadata content_dir="$CONTENT_DIR" \
-            --metadata file_in="$1" \
-            --metadata-file metadata/metadata.yaml \
-            --metadata-file "$meta_file" \
-            --lua-filter scripts/metadata_filter.lua \
-            $FILTERS
-
-        # echo "$(pandoc "$1" \
-        #     -f markdown-citations \
-        #     -t plain \
-        #     --no-highlight \
-        #     --template scripts/metadata_tpl.json \
-        #     --metadata content_dir="$CONTENT_DIR" \
-        #     --metadata file_in="$1" \
-        #     --metadata-file metadata/metadata.yaml \
-        #     --metadata-file "$meta_file" \
-        #     --lua-filter scripts/metadata_filter.lua \
-        #     $FILTERS)"
-
-        rm "$meta_file"
-
-        echo -e "\033[0;90m[COMPILE ]\033[0m     Done"
-    else
-        local file_out=$(get_filename_out "$1")
-
-        mkdir -p $(dirname "$file_out")
-
-        echo -e "\033[0;32m[COPY    ]\033[0m $1 -> $file_out"
-
-        cp "$1" "$file_out"
-    fi
-}
-
-mdfilter=""
-if [ "$LIVE" != true ]; then
-    mdfilter="! -name _*.md"
-fi
-
-if [ -z "$1" ]; then
-    find "$CONTENT_DIR" \
-        -type f \
-        ! -name ".*" \
-        $mdfilter \
-        | while read file_in
-            do
-                handle "$file_in"
-            done
-elif [ "$1" = "all_md" ]; then
-    find "$CONTENT_DIR" \
-        -type f \
-        -name "*.md" \
-        ! -name ".*" \
-        $mdfilter \
-        | while read file_in
-            do
-                handle "$file_in"
-            done
-elif [ "$1" = "single" ]; then
-    if [ -z "$2" ]; then
-        echo -e "\033[0;31m[ERROR   ]\033[0m \"single\" operation requires file argument"
-    else
-        filename=$(basename "$2")
-        if [ "${filename:0:1}" != "_" ]; then
-            handle "$2"
-        fi
-    fi
-elif [ "$1" = "delete" ]; then
-    if [ -z "$2" ]; then
-        echo -e "\033[0;31m[ERROR   ]\033[0m \"delete\" operation requires file argument"
-    else
-        file_out=$(get_filename_out "$2")
-        if [ -f "$file_out" ] || [ -d "$file_out" ]; then
-            echo -e "\033[0;32m[DELETE  ]\033[0m $2 -> $file_out"
-            rm -rf $file_out
-        fi
-    fi
-else
-    echo -e "\033[0;31m[ERROR   ]\033[0m Unknown operation: \"$1\""
-fi
diff --git a/scripts/build_fonts.sh b/scripts/build_fonts.sh
deleted file mode 100755
index 7d368e7..0000000
--- a/scripts/build_fonts.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/bash
-
-source "site.defaults.conf"
-
-find "${ASSETS_DIR}fonts" \
-    -type f \
-    -name "*.ttf" \
-    | while read file
-        do
-            target_file=$(basename "${file%.ttf}.woff2")
-
-            echo -e "\033[0;32m[MINIFY  ]\033[0m $file -> $OUTPUT_DIR$target_file"
-
-            pyftsubset "$file" \
-                --text-file="${ASSETS_DIR}fonts/glyphs.txt" \
-                --layout-features+=ss02,ss09,dlig \
-                --flavor="woff2" \
-                --output-file="$OUTPUT_DIR$target_file"
-        done
diff --git a/scripts/build_sass.sh b/scripts/build_sass.sh
deleted file mode 100755
index 3f5f768..0000000
--- a/scripts/build_sass.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/bash
-
-source "site.defaults.conf"
-
-echo -e "\033[0;32m[COMPILE ]\033[0m ${ASSETS_DIR}css/style.scss -> ${OUTPUT_DIR}style.css"
-sassc -t compressed ${ASSETS_DIR}css/style.scss | ./node_modules/.bin/postcss --use autoprefixer --no-map > "${OUTPUT_DIR}style.css"
diff --git a/scripts/deploy.sh b/scripts/deploy.sh
deleted file mode 100755
index a810b74..0000000
--- a/scripts/deploy.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/bash
-
-source "site.defaults.conf"
-
-echo -e "\033[0;32m[DEPLOY  ]\033[0m $DEPLOY_TARGET"
-rsync --progress --stats -rvz --delete "$OUTPUT_DIR" "$DEPLOY_TARGET"
diff --git a/scripts/metadata_filter.lua b/scripts/metadata_filter.lua
index 90ca465..21f7759 100644
--- a/scripts/metadata_filter.lua
+++ b/scripts/metadata_filter.lua
@@ -5,27 +5,21 @@ function format_date(date)
     local year, month, day = date:match("(%d%d%d%d)-(%d%d)-(%d%d)")
     if year == nil then return nil end
 
-    local time = os.time({
-        year = tonumber(year),
-        month = tonumber(month),
-        day = tonumber(day)
-    })
+    local time = os.time({year = tonumber(year), month = tonumber(month), day = tonumber(day)})
     return pandoc.MetaMap({
-        yyyy_mm_dd = pandoc.MetaString(os.date("%F", time)),
-        yyyy = pandoc.MetaString(os.date("%Y", time)),
-        mm = pandoc.MetaString(os.date("%m", time)),
-        dd = pandoc.MetaString(os.date("%d", time)),
-        rfc3339 = pandoc.MetaString(os.date("%FT%T+00:00", time)),
-        long = pandoc.MetaString(os.date("%B %d, %Y", time)),
+        yyyy_mm_dd = os.date("%F", time),
+        yyyy = os.date("%Y", time),
+        mm = os.date("%m", time),
+        dd = os.date("%d", time),
+        rfc3339 = os.date("%FT%T+00:00", time),
+        long = os.date("%B %d, %Y", time),
     })
 end
 
 function table_to_list(t, cmp)
     local l = pandoc.List()
 
-    for key, value in pairs(t) do
-        l:insert(pandoc.MetaMap({key = key, value = value}))
-    end
+    for key, value in pairs(t) do l:insert(pandoc.MetaMap({key = key, value = value})) end
 
     l:sort(cmp or function(i1, i2) return i1.key < i2.key end)
 
@@ -83,9 +77,7 @@ function relative_to(dir, target)
     end
 
     if #dir < #target then
-        for i = #dir + 1, #target do
-            path = path .. (path == "" and "" or "/") .. target[i]
-        end
+        for i = #dir + 1, #target do path = path .. (path == "" and "" or "/") .. target[i] end
     elseif #dir > #target then
         for _ = #target + 1, #dir do path = "../" .. path end
     end
@@ -93,31 +85,8 @@ function relative_to(dir, target)
     return path
 end
 
-function apply_path_rewrites(rewrites, str)
-    for i = 1, #rewrites.path do
-        local r = rewrites.path[i]
-        str = str:gsub(pandoc.utils.stringify(r.from),
-                       pandoc.utils.stringify(r.to))
-    end
-    return str
-end
-
-function get_file_out(rewrites, content_dir, file_in)
-    local file_out = file_in:gsub("^" .. content_dir, ""):gsub("%.md$", ".html")
-
-    if file_out:match(".html$") and not file_out:match("/index%.html$") then
-        file_out = file_out:gsub("/(.*)%.html$", "/%1/index.html")
-    end
-
-    file_out = apply_path_rewrites(rewrites, file_out)
-
-    return pandoc.MetaString(file_out)
-end
-
 function make_absolute(rel, base)
-    return
-        rel:find("^/") ~= nil and rel or base:gsub("^(.*)/.-$", "%1") .. "/" ..
-            rel
+    return rel:find("^/") ~= nil and rel or base:gsub("^(.*)/.-$", "%1") .. "/" .. rel
 end
 
 function resolve_url(site_url, ref_file, target_file)
@@ -127,119 +96,82 @@ function resolve_url(site_url, ref_file, target_file)
     local abs = target_file
     local rel = relative_to(ref_base_dir, abs):gsub("/index%.html$", "/")
 
-    return pandoc.MetaMap({
-        abs = pandoc.MetaString(abs),
-        rel = pandoc.MetaString(rel),
-        full = pandoc.MetaString(site_url .. abs)
-    })
+    return pandoc.MetaMap({abs = abs, rel = rel, full = (site_url .. abs)})
 end
 
 function resolve_layout(layout)
-    if layout then
+    if layout ~= nil then
         layout = pandoc.utils.stringify(layout)
-        return pandoc.MetaMap({
-            id = pandoc.MetaString(layout),
-            ["is_" .. layout] = pandoc.MetaBool(true)
-        })
+        return pandoc.MetaMap({id = layout, ["is_" .. layout] = pandoc.MetaBool(true)})
     end
 end
 
-function resolve_section(content_dir, file_in)
-    local section = file_in:gsub("^" .. content_dir, ""):match("^/(.-)[/.]") or
-                        "index"
+function resolve_namespace(namespace)
+    namespace = pandoc.utils.stringify(namespace)
+
+    local root = "index"
+    if namespace ~= "" then root = namespace:gsub("^/([^/]*).*$", "%1") end
+
     return pandoc.MetaMap({
-        id = pandoc.MetaString(section),
-        ["is_" .. section] = pandoc.MetaBool(true)
+        root = pandoc.MetaMap({id = root, ["is_" .. root] = pandoc.MetaBool(true)}),
+        full = namespace,
     })
 end
 
 function resolve_category(categories, category)
-    if categories and category then
+    if categories ~= nil and category ~= nil then
         category = pandoc.utils.stringify(category)
         data = pandoc.MetaMap(categories[category])
-        data.id = pandoc.MetaString(category)
+        data.id = category
         return data
     end
 end
 
-function prep_main_menu(rewrites, section, main_menu)
+function prep_menu(active_id, main_menu)
     local active_item = nil
 
     for i = 1, #main_menu do
         local item = main_menu[i]
-        local active = pandoc.utils.stringify(item.id) == section.id
+        local active = pandoc.utils.stringify(item.id) == active_id
         item.active = pandoc.MetaBool(active)
-        item.url = apply_path_rewrites(rewrites,
-                                       pandoc.utils.stringify(item.url))
         if active then active_item = item end
     end
 
     return pandoc.MetaMap({
-        items = main_menu:filter(function(item)
-            return not item.hidden or item.active
-        end),
-        active = active_item
+        items = main_menu:filter(function(item) return not item.hidden or item.active end),
+        active = active_item,
     })
 end
 
-function organize_subpages(site_url, ref_file, pages)
-    for i = 1, #pages do
-        local page = pages[i]
-        page.url = resolve_url(site_url, ref_file,
-                               pandoc.utils.stringify(page.file_out))
-    end
-
-    local pages_grouped_date =
-        group_by(pages, function(p) return not p.date end)
-
-    local pages_undated = pages_grouped_date[true] or pandoc.MetaList({})
-    pages_undated:sort(function(p1, p2)
-        return pandoc.utils.stringify(p1.title) <
-                   pandoc.utils.stringify(p2.title)
-    end)
+function process_pages(global, pages_by_id)
+    if pages_by_id == nil then pages_by_id = {} end
 
-    local pages_dated = pages_grouped_date[false] or pandoc.MetaList({})
-    pages_dated:sort(function(p1, p2)
-        return pandoc.utils.stringify(p1.date.yyyy_mm_dd) >
-                   pandoc.utils.stringify(p2.date.yyyy_mm_dd)
-    end)
+    local pages_list = pandoc.List()
 
-    local pages_categorized = pages:filter(
-                                  function(p) return p.category ~= nil end)
-    pages_categorized:sort(function(p1, p2)
-        return pandoc.utils.stringify(p1.title) <
-                   pandoc.utils.stringify(p2.title)
-    end)
+    for _, page in pairs(pages_by_id) do
+        page = process(global, page)
+        pages_list:insert(page)
+    end
 
-    local pages_by_year = group_by(pages_dated, function(p)
-        return pandoc.utils.stringify(p.date.yyyy)
-    end)
-    pages_by_year = pandoc.MetaList(table_to_list(pages_by_year,
-                                                  function(i1, i2)
-        return i1.key > i2.key
-    end))
+    local pages_categorized = pages_list:filter(function(p) return p.category ~= nil end)
+    pages_categorized:sort(function(p1, p2) return p1.title < p2.title end)
 
-    local pages_by_category = group_by(pages_categorized, function(p)
-        return pandoc.utils.stringify(p.category.id)
-    end)
+    local pages_by_category = group_by(pages_categorized,
+        function(p) return pandoc.utils.stringify(p.category.id) end)
     pages_by_category = pandoc.MetaList(table_to_list(pages_by_category,
-                                                      function(i1, i2)
-        return i1.key < i2.key
-    end))
+        function(i1, i2) return i1.key < i2.key end))
 
     local pages_data = pandoc.MetaMap({
-        all_dated = pages_dated,
-        all_undated = pages_undated,
-        by_year = pages_by_year,
+        all = pages_list,
+        by_id = pages_by_id,
         by_category = pages_by_category,
-        last_update = #pages_dated ~= 0 and pages_dated[1].last_update
     })
 
     local categories_data = group_by(pages_categorized, function(p)
         return p.category and pandoc.utils.stringify(p.category.id)
     end, function(stats, _, p)
         if not stats then
-            return {name = pandoc.MetaString(p.category.name), count = 1}
+            return {name = p.category.name, count = 1}
         else
             stats.count = stats.count + 1
         end
@@ -247,72 +179,52 @@ function organize_subpages(site_url, ref_file, pages)
     categories_data = pandoc.MetaList(table_to_list(categories_data))
 
     for i = 1, #categories_data do
-        categories_data[i].value.count =
-            pandoc.MetaString(("%d"):format(categories_data[i].value.count))
+        categories_data[i].value.count = ("%d"):format(categories_data[i].value.count)
     end
 
     return pages_data, categories_data
 end
 
-function Meta(meta)
-    meta.content_dir = meta.content_dir:gsub("/$", "")
-    meta.site.url = pandoc.utils.stringify(meta.site.url):gsub("/$", "")
-    meta.rewrites = meta.rewrites or
-                        pandoc.MetaMap({path = pandoc.MetaList({})})
-    meta.page_type = meta.page_type or "page"
+function process(global, meta)
+    meta.namespace = resolve_namespace(meta.namespace)
+    meta.file_out = pandoc.utils.stringify(meta.file_out):gsub("^out", "")
     meta.layout = resolve_layout(meta.layout)
-    meta.section = resolve_section(meta.content_dir, meta.file_in)
+    meta.url = resolve_url(global.site.url, global.file_out, meta.file_out)
 
-    meta.file_out = get_file_out(meta.rewrites, meta.content_dir, meta.file_in)
-    if meta.relative_to == nil then meta.relative_to = meta.file_in end
-    meta.relative_to_out = get_file_out(meta.rewrites, meta.content_dir,
-                                        meta.relative_to)
+    if meta.title ~= nil then
+        meta.title = pandoc.utils.stringify(meta.title)
+    else
+        meta.title = ""
+    end
 
-    meta.url = resolve_url(meta.site.url, meta.relative_to_out, meta.file_out)
     if meta.preview ~= nil then
-        meta.preview = resolve_url(meta.site.url, meta.relative_to_out,
-                                   make_absolute(
-                                       pandoc.utils.stringify(meta.preview),
-                                       meta.file_out))
+        meta.preview = make_absolute(pandoc.utils.stringify(meta.preview), meta.file_out)
+        meta.preview = resolve_url(global.site.url, global.file_out, meta.preview)
     end
 
-    meta.date = format_date(meta.date)
+    if meta.date ~= nil then meta.date = format_date(meta.date) end
+
     if meta.last_update ~= nil then
         meta.last_update = format_date(meta.last_update)
     else
         meta.last_update = meta.date
     end
 
-    meta.category = resolve_category(meta.categories[meta.section.id],
-                                     meta.category)
-    meta.categories = nil
+    meta.category = resolve_category(global.categories[meta.namespace.root.id], meta.category)
 
-    if meta.page_type == "feed" then
-        meta.page = pandoc.MetaMap({
-            url = resolve_url(meta.site.url, meta.relative_to_out,
-                              meta.file_out:gsub("%.xml$", ".html"))
-        })
+    if meta.menus ~= nil and meta.menus.main ~= nil then
+        meta.menus.main = prep_menu(meta.namespace.root.id, meta.menus.main)
     end
 
-    if meta.create_feed then
-        meta.feed = pandoc.MetaMap({
-            url = resolve_url(meta.site.url, meta.relative_to_out,
-                              meta.file_out:gsub("%.html$", ".xml"))
-        })
-    end
+    local pages, local_categories = process_pages(global, meta.pages)
+    meta.pages = pages
+    meta.local_categories = local_categories
 
-    if meta.menus and meta.menus.main then
-        meta.menus.main = prep_main_menu(meta.rewrites, meta.section,
-                                         meta.menus.main)
-    end
+    return meta
+end
 
-    if meta.pages then
-        local pages, categories = organize_subpages(meta.site.url,
-                                                    meta.relative_to_out,
-                                                    meta.pages)
-        meta.pages = pages
-        meta.categories = categories
-    end
+function Meta(meta)
+    meta.site.url = pandoc.utils.stringify(meta.site.url):gsub("/$", "")
 
-    return meta
+    return process(meta, meta)
 end
diff --git a/scripts/subpages.jq b/scripts/subpages.jq
new file mode 100644
index 0000000..4850703
--- /dev/null
+++ b/scripts/subpages.jq
@@ -0,0 +1,8 @@
+[
+    .[]
+        | . as $page
+        | (.namespace | ltrimstr($namespace + "/") | split("/") | (.[] |= ["pages",.]) | flatten) as $path
+        | null
+        | setpath($path; $page)
+]
+    | reduce .[] as $item ({}; . * $item)
diff --git a/scripts/watch_content.sh b/scripts/watch_content.sh
deleted file mode 100755
index 30f8a6c..0000000
--- a/scripts/watch_content.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/bash
-
-source "site.defaults.conf"
-
-inotifywait -qrme close_write,delete,move --format "%w%f" "${CONTENT_DIR%/}" \
-    | while read file
-        do
-            if [ -f "$file" ]; then
-                # scripts/build_content.sh "single" "$file"
-                scripts/build_content.sh
-            elif [ ! -d "$file" ]; then
-                scripts/build_content.sh "delete" "$file"
-            fi
-        done
diff --git a/scripts/watch_filters.sh b/scripts/watch_filters.sh
deleted file mode 100755
index 5dd6ad5..0000000
--- a/scripts/watch_filters.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash
-
-source "site.defaults.conf"
-
-inotifywait -qrme close_write,delete,move --format "%w%f" "${FILTERS_DIR%/}" \
-    | while read file
-        do
-            scripts/build_content.sh "all_md"
-        done
diff --git a/scripts/watch_metadata.sh b/scripts/watch_metadata.sh
deleted file mode 100755
index 2f6efde..0000000
--- a/scripts/watch_metadata.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash
-
-source "site.defaults.conf"
-
-inotifywait -qrme close_write,delete,move --format "%w%f" "${METADATA_DIR%/}" \
-    | while read file
-        do
-            scripts/build_content.sh "all_md"
-        done
diff --git a/scripts/watch_sass.sh b/scripts/watch_sass.sh
deleted file mode 100755
index 7345eb3..0000000
--- a/scripts/watch_sass.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash
-
-source "site.defaults.conf"
-
-inotifywait -qrme close_write,delete,move --format "%w%f" "${ASSETS_DIR}css" \
-    | while read file
-        do
-            scripts/build_sass.sh
-        done
diff --git a/scripts/watch_templates.sh b/scripts/watch_templates.sh
deleted file mode 100755
index 70ae4c3..0000000
--- a/scripts/watch_templates.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash
-
-source "site.defaults.conf"
-
-inotifywait -qrme close_write,delete,move --format "%w%f" "${TEMPLATES_DIR%/}" \
-    | while read file
-        do
-            scripts/build_content.sh "all_md"
-        done
diff --git a/site.defaults.conf b/site.defaults.conf
deleted file mode 100644
index de4ac4c..0000000
--- a/site.defaults.conf
+++ /dev/null
@@ -1,12 +0,0 @@
-DEPLOY_TARGET="vulpes@94.130.78.123:/srv/http/volpeon.ink/"
-
-CONTENT_DIR="content/"
-ASSETS_DIR="assets/"
-FILTERS_DIR="filters/"
-METADATA_DIR="metadata/"
-TEMPLATES_DIR="templates/"
-OUTPUT_DIR="output/"
-
-if [ -f "site.conf" ]; then
-    source "site.conf"
-fi
diff --git a/templates/base.html b/templates/base.html
index cd1e869..a5d29b5 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -19,14 +19,7 @@
         
     $endif$
 
-    $for(feeds)$
-        
-    $endfor$
-    $if(feed)$
-        
-    $endif$
-
-    $if(section.is_index)$$else$$title$ – $endif$$site.title$
+    $if(namespace.root.is_index)$$else$$title$ – $endif$$site.title$
 
     
     
@@ -46,7 +39,7 @@
                 
             
         
-        $if(section.is_index)$
+        $if(namespace.root.is_index)$
         $else$
             $for(menus.main.items)$
                 $if(it.active)$
@@ -61,7 +54,7 @@
     
         
     
- $if(section.is_index)$ + $if(namespace.root.is_index)$ ${layouts/index()} $elseif(layout.is_categorized_list)$ ${layouts/categorized_list()} diff --git a/templates/layouts/index.html b/templates/layouts/index.html index 6d4c776..45ac82e 100644 --- a/templates/layouts/index.html +++ b/templates/layouts/index.html @@ -59,13 +59,13 @@ $body$ - $subsections.projects.title$ + $pages.by_id.projects.title$