From 0dda0350dec5e82be8e5a7767c7f0a56c0d48c94 Mon Sep 17 00:00:00 2001 From: Sam Anthony Date: Fri, 6 Mar 2026 11:48:29 -0500 Subject: init Go and Hugo --- .gitignore | 3 +++ .gitmodules | 3 +++ Makefile | 10 ++++++++++ README | 1 + archetypes/default.md | 5 +++++ cmd/webshopd/main.go | 15 +++++++++++++++ go.mod | 3 +++ hugo.toml | 4 ++++ themes/aoidh | 1 + 9 files changed, 45 insertions(+) create mode 100644 .gitignore create mode 100644 .gitmodules create mode 100644 Makefile create mode 100644 README create mode 100644 archetypes/default.md create mode 100644 cmd/webshopd/main.go create mode 100644 go.mod create mode 100644 hugo.toml create mode 160000 themes/aoidh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0314984 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +bin/ +.hugo_build.lock +public/ diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..016f735 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "themes/aoidh"] + path = themes/aoidh + url = https://git.samanthony.xyz/aoidh diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..27685dc --- /dev/null +++ b/Makefile @@ -0,0 +1,10 @@ +all: public bin/webshopd + +public: + hugo build + +bin/%: cmd/% + go build -o $@ ./$< + +clean: + rm -rf bin public diff --git a/README b/README new file mode 100644 index 0000000..1e7bbb8 --- /dev/null +++ b/README @@ -0,0 +1 @@ +Web shop for shop.samanthony.xyz. diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 0000000..25b6752 --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1,5 @@ ++++ +date = '{{ .Date }}' +draft = true +title = '{{ replace .File.ContentBaseName "-" " " | title }}' ++++ diff --git a/cmd/webshopd/main.go b/cmd/webshopd/main.go new file mode 100644 index 0000000..519a299 --- /dev/null +++ b/cmd/webshopd/main.go @@ -0,0 +1,15 @@ +package main + +import ( + "fmt" + "html" + "log" + "net/http" +) + +func main() { + http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { + fmt.Fprintf(w, "Hello, %q", html.EscapeString(r.URL.Path)) + }) + log.Fatal(http.ListenAndServe(":8081", nil)) +} diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..4d48f6f --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module git.samanthony.xyz/webshop + +go 1.25.5 diff --git a/hugo.toml b/hugo.toml new file mode 100644 index 0000000..52d0361 --- /dev/null +++ b/hugo.toml @@ -0,0 +1,4 @@ +baseURL = 'https://example.org/' +languageCode = 'en-us' +title = 'My New Hugo Site' +theme = 'aoidh' diff --git a/themes/aoidh b/themes/aoidh new file mode 160000 index 0000000..18d0eb0 --- /dev/null +++ b/themes/aoidh @@ -0,0 +1 @@ +Subproject commit 18d0eb02ee0e9f199ff755d58dea7d523838f3c7 -- cgit v1.2.3