diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2026-03-06 11:48:29 -0500 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2026-03-06 11:48:29 -0500 |
| commit | 0dda0350dec5e82be8e5a7767c7f0a56c0d48c94 (patch) | |
| tree | 7cd4c60b058cd6b6390ecd09f4a5f9687ddedbc0 | |
| download | buth-0dda0350dec5e82be8e5a7767c7f0a56c0d48c94.zip | |
init Go and Hugo
| -rw-r--r-- | .gitignore | 3 | ||||
| -rw-r--r-- | .gitmodules | 3 | ||||
| -rw-r--r-- | Makefile | 10 | ||||
| -rw-r--r-- | README | 1 | ||||
| -rw-r--r-- | archetypes/default.md | 5 | ||||
| -rw-r--r-- | cmd/webshopd/main.go | 15 | ||||
| -rw-r--r-- | go.mod | 3 | ||||
| -rw-r--r-- | hugo.toml | 4 | ||||
| m--------- | themes/aoidh | 0 |
9 files changed, 44 insertions, 0 deletions
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 @@ -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)) +} @@ -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 +Subproject 18d0eb02ee0e9f199ff755d58dea7d523838f3c |