From b006435f8c52f131a6cfda4e5c623156f743a8a0 Mon Sep 17 00:00:00 2001 From: Erik Winter Date: Thu, 17 Feb 2022 07:00:17 +0100 Subject: [PATCH] fix links --- doc/a-tiny-subset-of-asciidoc-for-blogging.adoc | 4 ++-- doc/code-walkthrough.adoc | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/doc/a-tiny-subset-of-asciidoc-for-blogging.adoc b/doc/a-tiny-subset-of-asciidoc-for-blogging.adoc index 7d0e7f5..b71ab4b 100644 --- a/doc/a-tiny-subset-of-asciidoc-for-blogging.adoc +++ b/doc/a-tiny-subset-of-asciidoc-for-blogging.adoc @@ -2,7 +2,7 @@ 2020-12-01 :tags: asciidoc, shitty-ssg, public, en -As promised in /articles/2020/why-i-built-my-own-shitty-static-site-generator/[my earlier post] on why I decided to build my own Shitty Static Site Generator, I’ll explain the markup format that I use for the posts on this site. The goal was to find a subset of Asciidoc that would be easy to parse myself, but would still result in valid documents, so that they can be processed by all other tools that understand Asciidoc without any problem. For instance, I wanted the syntax coloring in my editor to ‘just work’. +As promised in https://ewintr.nl/shitty-ssg/why-i-built-my-own-shitty-static-site-generator/[my earlier post] on why I decided to build my own Shitty Static Site Generator, I’ll explain the markup format that I use for the posts on this site. The goal was to find a subset of Asciidoc that would be easy to parse myself, but would still result in valid documents, so that they can be processed by all other tools that understand Asciidoc without any problem. For instance, I wanted the syntax coloring in my editor to ‘just work’. In order to achieve that, I selected the following parts from the Asciidoc specification. They are categorized by the types of elements as they are used in a HTML page: @@ -12,7 +12,7 @@ In order to achieve that, I selected the following parts from the Asciidoc speci Everything that is not described below will not work. I may add new stuff in the future, if I feel it is needed. If I do so, I will update this page. -The https://erikwinter.nl/articles/2021/shitty-ssg-code-walkthrough/[code walkthrough] of the SSG contains a short description of how the parser works. +The https://ewintr.nl/shitty-ssg/shitty-ssg-code-walkthrough/[code walkthrough] of the SSG contains a short description of how the parser works. == Header diff --git a/doc/code-walkthrough.adoc b/doc/code-walkthrough.adoc index fc52a29..29a98c5 100644 --- a/doc/code-walkthrough.adoc +++ b/doc/code-walkthrough.adoc @@ -2,17 +2,19 @@ 2021-03-09 :tags: go, asciidoc, public, en -One would expect a walk through the code of a self proclaimed “shitty” software project not to be a pleasant read. I promise that it is not that bad. Earlier I https://erikwinter.nl/articles/2020/why-i-built-my-own-shitty-static-site-generator/[described] why I built this static site generator and the https://erikwinter.nl/articles/2020/a-tiny-subset-of-asciidoc-for-blogging/[Asciidoc subset] that it uses as a markup language. Here I will describe the code that transforms these documents into a website. Later I will go more into detail on how the flexibility of this generator is used to create and publish to multiple sites from multiple sources in one go. +One would expect a walk through the code of a self proclaimed “shitty” software project not to be a pleasant read. I promise that it is not that bad. Earlier I https://ewintr.nl/shitty-ssg/why-i-built-my-own-shitty-static-site-generator/[described] why I built this static site generator and the https://ewintr.nl/shitty-ssg/a-tiny-subset-of-asciidoc-for-blogging/[Asciidoc subset] that it uses as a markup language. Here I will describe the code that transforms these documents into a website. Later I will go more into detail on how the flexibility of this generator is used to create and publish to multiple sites from multiple sources in one go. Originally I made the SSG to create one site. But it turned out to be not that hard to generalize it and now it generates: * My personal site: https://erikwinter.nl[https://erikwinter.nl] -* A second site with just the Dutch short stories: https://vrijkorteverhalen.nl _edit: I’ve decomissioned that site._ +* A second site with just the Dutch short stories: https://vrijkorteverhalen.nl * A very basic note viewer for the terminal. As it felt weird to fire up a browser and go on the internet, just to view a note that was already sitting on my hard drive a few directories away. +_Edit: I’ve changed some things since then, the links above might not work anymore._ + In the future I might add an export for a Gopher or a Gemini site and if the collection of notes grows I’ll probably improve the search somewhat. Now it only finds notes on tags or whole words. It displays them just in plain text. I will also probably dive more into shell escape codes and such to see if the apperance can be improved. -The code itself can be found https://ewintr.nl/shitty-ssg[here]. +The code itself can be found https://git.ewintr.nl/shitty-ssg[here]. == Directories @@ -27,7 +29,7 @@ So how does it work? On a very high level, the directory structure looks like th    └── adoc ---- -I arrived there by following https://erikwinter.nl/notes/2021/my-default-golang-directory-structure/[the conventions for folders] I always follow when starting a new Go program. In this case there are two binaries. One is the notes program, the other the site generator. That one generator can generate both sites, depending on the configuration its fed. +I arrived there by following https://ewintr.nl/devnotes/2021/my-default-go-directory-structure/[the conventions for folders] I always follow when starting a new Go program. In this case there are two binaries. One is the notes program, the other the site generator. That one generator can generate both sites, depending on the configuration its fed. Everything is built on the `adoc` package, that parses Asciidoc files in the most clumsy way possible. You give it a string, it gives you back a pointer to an `ADoc` struct that holds all information found in the string.