domain update

This commit is contained in:
Erik Winter 2024-09-17 07:39:49 +02:00
parent 60d0c0b005
commit cbb14c7832
23 changed files with 43 additions and 42 deletions

View File

@ -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() {

View File

@ -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

View File

@ -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

View File

@ -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 (

View File

@ -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 (

View File

@ -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 {

View File

@ -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) {

View File

@ -1,7 +1,7 @@
package site
import (
"code.ewintr.nl/shitty-ssg/pkg/adoc"
"go-mod.ewintr.nl/shitty-ssg/pkg/adoc"
)
const (

View File

@ -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) {

View File

@ -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 (

View File

@ -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) {

View File

@ -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) {

View File

@ -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

View File

@ -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{

View File

@ -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, Ill 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, Ill 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

View File

@ -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: Ive 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 Ill 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

View File

@ -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 cant handle. But that is not important. It works for my problem. If I dont like something, I can fix it. If bug doesnt bother me, Ill 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.

9
go.mod
View File

@ -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
)

4
go.sum
View File

@ -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=

View File

@ -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) {

View File

@ -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) {

View File

@ -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) {

View File

@ -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) {