From cbb14c783237953ce331358711b3f7a2ca921010 Mon Sep 17 00:00:00 2001 From: Erik Winter Date: Tue, 17 Sep 2024 07:39:49 +0200 Subject: [PATCH] domain update --- cmd/notes/main.go | 2 +- cmd/notes/note/note.go | 2 +- cmd/notes/note/notes.go | 2 +- cmd/ssg/main.go | 2 +- cmd/ssg/site/config.go | 2 +- cmd/ssg/site/html.go | 4 ++-- cmd/ssg/site/html_test.go | 6 +++--- cmd/ssg/site/meta.go | 2 +- cmd/ssg/site/meta_test.go | 6 +++--- cmd/ssg/site/post.go | 4 ++-- cmd/ssg/site/post_test.go | 6 +++--- cmd/ssg/site/posts_test.go | 4 ++-- cmd/ssg/site/site.go | 2 +- cmd/ssg/site/sites.go | 2 +- doc/a-tiny-subset-of-asciidoc-for-blogging.adoc | 4 ++-- doc/code-walkthrough.adoc | 4 ++-- doc/why-i-built-my-own-shitty-static-site-generator.adoc | 2 +- go.mod | 9 +++++---- go.sum | 4 ++-- pkg/adoc/adoc_test.go | 4 ++-- pkg/adoc/block_test.go | 4 ++-- pkg/adoc/inline_test.go | 4 ++-- pkg/adoc/parser_test.go | 4 ++-- 23 files changed, 43 insertions(+), 42 deletions(-) diff --git a/cmd/notes/main.go b/cmd/notes/main.go index 961232a..ea137db 100644 --- a/cmd/notes/main.go +++ b/cmd/notes/main.go @@ -8,7 +8,7 @@ import ( "path/filepath" "strconv" - "code.ewintr.nl/shitty-ssg/cmd/notes/note" + "go-mod.ewintr.nl/shitty-ssg/cmd/notes/note" ) func main() { diff --git a/cmd/notes/note/note.go b/cmd/notes/note/note.go index 277df35..cafc29a 100644 --- a/cmd/notes/note/note.go +++ b/cmd/notes/note/note.go @@ -3,7 +3,7 @@ package note import ( "strings" - "code.ewintr.nl/shitty-ssg/pkg/adoc" + "go-mod.ewintr.nl/shitty-ssg/pkg/adoc" ) type Kind string diff --git a/cmd/notes/note/notes.go b/cmd/notes/note/notes.go index f6736d4..50922bf 100644 --- a/cmd/notes/note/notes.go +++ b/cmd/notes/note/notes.go @@ -3,7 +3,7 @@ package note import ( "io/ioutil" - "code.ewintr.nl/shitty-ssg/pkg/adoc" + "go-mod.ewintr.nl/shitty-ssg/pkg/adoc" ) type Notes []*Note diff --git a/cmd/ssg/main.go b/cmd/ssg/main.go index 0eaf264..82f9410 100644 --- a/cmd/ssg/main.go +++ b/cmd/ssg/main.go @@ -9,7 +9,7 @@ import ( "path/filepath" "strings" - "code.ewintr.nl/shitty-ssg/cmd/ssg/site" + "go-mod.ewintr.nl/shitty-ssg/cmd/ssg/site" ) var ( diff --git a/cmd/ssg/site/config.go b/cmd/ssg/site/config.go index feaa131..21267a8 100644 --- a/cmd/ssg/site/config.go +++ b/cmd/ssg/site/config.go @@ -6,7 +6,7 @@ import ( "path/filepath" "text/template" - "code.ewintr.nl/shitty-ssg/pkg/adoc" + "go-mod.ewintr.nl/shitty-ssg/pkg/adoc" ) var ( diff --git a/cmd/ssg/site/html.go b/cmd/ssg/site/html.go index 3732b04..ccd7fcf 100644 --- a/cmd/ssg/site/html.go +++ b/cmd/ssg/site/html.go @@ -5,8 +5,8 @@ import ( "html" "strings" - "code.ewintr.nl/go-kit/slugify" - "code.ewintr.nl/shitty-ssg/pkg/adoc" + "go-mod.ewintr.nl/go-kit/slugify" + "go-mod.ewintr.nl/shitty-ssg/pkg/adoc" ) type HTMLPost struct { diff --git a/cmd/ssg/site/html_test.go b/cmd/ssg/site/html_test.go index 6134985..cf25437 100644 --- a/cmd/ssg/site/html_test.go +++ b/cmd/ssg/site/html_test.go @@ -3,9 +3,9 @@ package site_test import ( "testing" - "code.ewintr.nl/go-kit/test" - "code.ewintr.nl/shitty-ssg/cmd/ssg/site" - "code.ewintr.nl/shitty-ssg/pkg/adoc" + "go-mod.ewintr.nl/go-kit/test" + "go-mod.ewintr.nl/shitty-ssg/cmd/ssg/site" + "go-mod.ewintr.nl/shitty-ssg/pkg/adoc" ) func TestFormatBlock(t *testing.T) { diff --git a/cmd/ssg/site/meta.go b/cmd/ssg/site/meta.go index 00e6286..af8c76c 100644 --- a/cmd/ssg/site/meta.go +++ b/cmd/ssg/site/meta.go @@ -1,7 +1,7 @@ package site import ( - "code.ewintr.nl/shitty-ssg/pkg/adoc" + "go-mod.ewintr.nl/shitty-ssg/pkg/adoc" ) const ( diff --git a/cmd/ssg/site/meta_test.go b/cmd/ssg/site/meta_test.go index 2a2a52b..e29e28b 100644 --- a/cmd/ssg/site/meta_test.go +++ b/cmd/ssg/site/meta_test.go @@ -3,9 +3,9 @@ package site_test import ( "testing" - "code.ewintr.nl/go-kit/test" - "code.ewintr.nl/shitty-ssg/cmd/ssg/site" - "code.ewintr.nl/shitty-ssg/pkg/adoc" + "go-mod.ewintr.nl/go-kit/test" + "go-mod.ewintr.nl/shitty-ssg/cmd/ssg/site" + "go-mod.ewintr.nl/shitty-ssg/pkg/adoc" ) func TestNewLanguage(t *testing.T) { diff --git a/cmd/ssg/site/post.go b/cmd/ssg/site/post.go index ba517a3..b0c98b6 100644 --- a/cmd/ssg/site/post.go +++ b/cmd/ssg/site/post.go @@ -9,8 +9,8 @@ import ( "strings" "time" - "code.ewintr.nl/go-kit/slugify" - "code.ewintr.nl/shitty-ssg/pkg/adoc" + "go-mod.ewintr.nl/go-kit/slugify" + "go-mod.ewintr.nl/shitty-ssg/pkg/adoc" ) var ( diff --git a/cmd/ssg/site/post_test.go b/cmd/ssg/site/post_test.go index ef3a73f..a3520e6 100644 --- a/cmd/ssg/site/post_test.go +++ b/cmd/ssg/site/post_test.go @@ -4,9 +4,9 @@ import ( "testing" "time" - "code.ewintr.nl/go-kit/test" - "code.ewintr.nl/shitty-ssg/cmd/ssg/site" - "code.ewintr.nl/shitty-ssg/pkg/adoc" + "go-mod.ewintr.nl/go-kit/test" + "go-mod.ewintr.nl/shitty-ssg/cmd/ssg/site" + "go-mod.ewintr.nl/shitty-ssg/pkg/adoc" ) func TestPost(t *testing.T) { diff --git a/cmd/ssg/site/posts_test.go b/cmd/ssg/site/posts_test.go index d796c3c..739ae86 100644 --- a/cmd/ssg/site/posts_test.go +++ b/cmd/ssg/site/posts_test.go @@ -4,8 +4,8 @@ import ( "testing" "time" - "code.ewintr.nl/go-kit/test" - "code.ewintr.nl/shitty-ssg/cmd/ssg/site" + "go-mod.ewintr.nl/go-kit/test" + "go-mod.ewintr.nl/shitty-ssg/cmd/ssg/site" ) func TestPosts(t *testing.T) { diff --git a/cmd/ssg/site/site.go b/cmd/ssg/site/site.go index ebed1d9..400ac9f 100644 --- a/cmd/ssg/site/site.go +++ b/cmd/ssg/site/site.go @@ -5,7 +5,7 @@ import ( "os" "path/filepath" - "code.ewintr.nl/shitty-ssg/pkg/adoc" + "go-mod.ewintr.nl/shitty-ssg/pkg/adoc" ) const dirMode = os.ModeDir | 0755 diff --git a/cmd/ssg/site/sites.go b/cmd/ssg/site/sites.go index 4c5b055..bf34b1b 100644 --- a/cmd/ssg/site/sites.go +++ b/cmd/ssg/site/sites.go @@ -1,6 +1,6 @@ package site -import "code.ewintr.nl/shitty-ssg/pkg/adoc" +import "go-mod.ewintr.nl/shitty-ssg/pkg/adoc" var ( SITE_CONFIG_EWNL = &SiteConfig{ diff --git a/doc/a-tiny-subset-of-asciidoc-for-blogging.adoc b/doc/a-tiny-subset-of-asciidoc-for-blogging.adoc index f9c40a4..26016f1 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 https://code.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’. +As promised in https://forgejo.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://code.ewintr.nl/shitty-ssg/shitty-ssg-code-walkthrough/[code walkthrough] of the SSG contains a short description of how the parser works. +The https://forgejo.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 2df585b..272e153 100644 --- a/doc/code-walkthrough.adoc +++ b/doc/code-walkthrough.adoc @@ -2,7 +2,7 @@ 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://code.ewintr.nl/shitty-ssg/why-i-built-my-own-shitty-static-site-generator/[described] why I built this static site generator and the https://code.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. +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://forgejo.ewintr.nl/shitty-ssg/why-i-built-my-own-shitty-static-site-generator/[described] why I built this static site generator and the https://forgejo.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: @@ -14,7 +14,7 @@ _Edit: I’ve changed some things since then, the domains above might not work a 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://codeberg.org/ewintr/shitty-ssg[here]. +The code itself can be found https://forgejo.ewintr.nl/ewintr/shitty-ssg[here]. == Directories diff --git a/doc/why-i-built-my-own-shitty-static-site-generator.adoc b/doc/why-i-built-my-own-shitty-static-site-generator.adoc index fc94ff9..f1e2a58 100644 --- a/doc/why-i-built-my-own-shitty-static-site-generator.adoc +++ b/doc/why-i-built-my-own-shitty-static-site-generator.adoc @@ -76,4 +76,4 @@ So, my advise is to be aware of the restrictions and the hidden models of the to In the title, I mention that my generator is “shitty” and it is. It does not have many features. It is riddled with bugs and edge cases that it can’t handle. But that is not important. It works for my problem. If I don’t like something, I can fix it. If bug doesn’t bother me, I’ll let it be. Like all creative endevours, it is important to just start and get it out. You can always improve it later. -I put the source online https://codeberg.org/ewintr/shitty-ssg[here]. See https://code.ewintr.nl/shitty-ssg/shitty-ssg-code-walkthrough/[here] for a high level overview. Not for people to blindly copy and run (why would you?), but to give some inspiration for people who are still on the fence. To show them that shitty does not have to be hard and that it can be good enough, as long as it is the right kind of shitty. _Your_ kind of shitty. +I put the source online https://forgejo.ewintr.nl/ewintr/shitty-ssg[here]. See https://go-mod.ewintr.nl/shitty-ssg/shitty-ssg-code-walkthrough/[here] for a high level overview. Not for people to blindly copy and run (why would you?), but to give some inspiration for people who are still on the fence. To show them that shitty does not have to be hard and that it can be good enough, as long as it is the right kind of shitty. _Your_ kind of shitty. diff --git a/go.mod b/go.mod index 3e65e40..aad2710 100644 --- a/go.mod +++ b/go.mod @@ -1,7 +1,8 @@ -module code.ewintr.nl/shitty-ssg +module go-mod.ewintr.nl/shitty-ssg go 1.21.5 -require code.ewintr.nl/go-kit v0.0.0-20240308074309-a1328c3c44c6 - -require golang.org/x/text v0.14.0 // indirect +require ( + go-mod.ewintr.nl/go-kit v0.0.0-20240915084633-589e6c3a4b97 // indirect + golang.org/x/text v0.14.0 // indirect +) diff --git a/go.sum b/go.sum index 7b96605..5b6390e 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,4 @@ -code.ewintr.nl/go-kit v0.0.0-20240308074309-a1328c3c44c6 h1:qZwAicZOd18o9qWCU3pSj/QnrSNLCAMAOPJvyLgBQ0U= -code.ewintr.nl/go-kit v0.0.0-20240308074309-a1328c3c44c6/go.mod h1:Yk8Mdn1f4/L9tcymurtItqevVkac6P9ljh2Sd3T+FS8= +go-mod.ewintr.nl/go-kit v0.0.0-20240915084633-589e6c3a4b97 h1:vk8KmsDbJOYFD8JrYPRlJ44ll6H2JgiPcYrNZNJccj8= +go-mod.ewintr.nl/go-kit v0.0.0-20240915084633-589e6c3a4b97/go.mod h1:JVAoSGJi3oLkkl+nGN0pqRjP6omkPfriCaT3CslW+Ok= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= diff --git a/pkg/adoc/adoc_test.go b/pkg/adoc/adoc_test.go index c016098..c1b639a 100644 --- a/pkg/adoc/adoc_test.go +++ b/pkg/adoc/adoc_test.go @@ -3,8 +3,8 @@ package adoc_test import ( "testing" - "code.ewintr.nl/go-kit/test" - "code.ewintr.nl/shitty-ssg/pkg/adoc" + "go-mod.ewintr.nl/go-kit/test" + "go-mod.ewintr.nl/shitty-ssg/pkg/adoc" ) func TestNewKind(t *testing.T) { diff --git a/pkg/adoc/block_test.go b/pkg/adoc/block_test.go index 6527345..2540170 100644 --- a/pkg/adoc/block_test.go +++ b/pkg/adoc/block_test.go @@ -3,8 +3,8 @@ package adoc_test import ( "testing" - "code.ewintr.nl/go-kit/test" - "code.ewintr.nl/shitty-ssg/pkg/adoc" + "go-mod.ewintr.nl/go-kit/test" + "go-mod.ewintr.nl/shitty-ssg/pkg/adoc" ) func TestParagraph(t *testing.T) { diff --git a/pkg/adoc/inline_test.go b/pkg/adoc/inline_test.go index c366b88..319d9eb 100644 --- a/pkg/adoc/inline_test.go +++ b/pkg/adoc/inline_test.go @@ -3,8 +3,8 @@ package adoc_test import ( "testing" - "code.ewintr.nl/go-kit/test" - "code.ewintr.nl/shitty-ssg/pkg/adoc" + "go-mod.ewintr.nl/go-kit/test" + "go-mod.ewintr.nl/shitty-ssg/pkg/adoc" ) func TestInlineSimple(t *testing.T) { diff --git a/pkg/adoc/parser_test.go b/pkg/adoc/parser_test.go index c3c9305..60dc593 100644 --- a/pkg/adoc/parser_test.go +++ b/pkg/adoc/parser_test.go @@ -5,8 +5,8 @@ import ( "testing" "time" - "code.ewintr.nl/go-kit/test" - "code.ewintr.nl/shitty-ssg/pkg/adoc" + "go-mod.ewintr.nl/go-kit/test" + "go-mod.ewintr.nl/shitty-ssg/pkg/adoc" ) func TestNew(t *testing.T) {