keyboard page, rework about, quick rebuild
sageclove
Sun, 02 Mar 2025 09:37:30 -0700
7 files changed,
66 insertions(+),
35 deletions(-)
M
.gitignore
→
.gitignore
@@ -1,3 +1,5 @@
/build/out/ /build/build -/build/__debug*+/build/__debug* + +.DS_Store
M
build/build.go
→
build/build.go
@@ -54,32 +54,15 @@ os.Exit(1)
} } } - fmt.Println("Starting build...") - os.RemoveAll(filepath.Join("out")) - os.Mkdir(filepath.Join("out"), 0777) - - fmt.Print("Building pages...") - buildSite(buildSiteLinkedList()) - fmt.Println("Done") - - fmt.Print("Copying assets...") - copyDir( - filepath.Join(rootPath, "assets"), - filepath.Join("out", "assets"), - ) - - cssOutPath := filepath.Join("out", "assets", "css") - os.Rename( - filepath.Join(cssOutPath, "style.css"), - filepath.Join(cssOutPath, "style."+strconv.FormatInt(now.Unix(), 10)+".css"), - ) - fmt.Println("Done") - - fmt.Println("Build complete.") + build() if serve { http.Handle("/", http.StripPrefix("/", http.FileServer(http.Dir("out")))) http.HandleFunc("GET /{page}", pageHandler("out")) fmt.Println("Serving on http://localhost:8000") + go waitForInput( + "Press Enter to rebuild", + build, + ) log.Fatal(http.ListenAndServe(":8000", nil)) } }@@ -235,3 +218,40 @@ os.CopyFS(dstPath, srcFS)
} func __(foo any) {} + +func waitForInput(message string, onInput func()) { + for { + fmt.Println(message) + var char rune + _, err := fmt.Scanf("%c", &char) + if err != nil { + log.Fatal(err) + } + onInput() + } +} + +func build() { + fmt.Println("Starting build...") + os.RemoveAll(filepath.Join("out")) + os.Mkdir(filepath.Join("out"), 0777) + + fmt.Print("Building pages...") + buildSite(buildSiteLinkedList()) + fmt.Println("Done") + + fmt.Print("Copying assets...") + copyDir( + filepath.Join(rootPath, "assets"), + filepath.Join("out", "assets"), + ) + + cssOutPath := filepath.Join("out", "assets", "css") + os.Rename( + filepath.Join(cssOutPath, "style.css"), + filepath.Join(cssOutPath, "style."+strconv.FormatInt(now.Unix(), 10)+".css"), + ) + fmt.Println("Done") + + fmt.Println("Build complete.") +}
M
pages/about.html
→
pages/about.html
@@ -17,16 +17,6 @@ </p>
<p> I work as a software developer. Despite that, I have a low opinion of modern technology. I am far more interested in low-tech solutions that prioritize simplicity, sustainability, and self-determination. To that end, I build simple software tools that meet my needs (this site being one such example). </p> -<h2>This site</h2> -<p> - This site is nominally a wiki, but really it's a place for anything that I want to put online about myself: it can be a gallery, a playground, a journal, it's up to me. This site is built using a bespoke static site generator I created, keeping with my philosophy of using simple, purpose-built tools. -</p> -<p> - Being a personal site, this site will never reach a finished state, at least not until I die. Things may change, move, or never be resolved. -</p> -<p> - This site's existence and design was inspired by <a href="https://wiki.xxiivv.com/site/home.html">Devine Lu Linvega's wiki</a>, <a href="https://100r.co/site/home.html">Hundred Rabbits</a>, and <a href="https://webring.xxiivv.com/">the many other personal sites</a> of the Merveilles collective. -</p> {{ end }} {{ define "scripts" }}
M
pages/keyboard.html
→
pages/keyboard.html
@@ -5,6 +5,15 @@
{{ define "body" }} {{ template "header" . }} <h1>{{.Title}}</h1> +<img style="width: 80ch;" src="/assets/img/keyboard.jpg"/> + +<p> + My keyboard is a hand-built (except for the PCB) Atreus62 from Profet Keyboards. + This project was a few firsts for me: it was my first soldering project (all those surface-mount diodes were a challenge) and it was my first time using a laser cutter to cut the acrylic for the case. +</p> +<p> + The keyswitches for the alphanumerics are Cherry MX Clears, while the modifiers use Cherry MX Browns. +</p> {{ end }} {{ define "scripts" }}
M
pages/meta.html
→
pages/meta.html
@@ -5,6 +5,18 @@
{{ define "body" }} {{ template "header" . }} <h1>{{.Title}}</h1> +<hr> + +<h2>About this site</h2> +<p> + This site is a place for anything that I want to put online about myself: it's a gallery, a playground, and a journal. This site is built using a bespoke static site generator I created specifically for this site. +</p> +<p> + Being a personal site, this site will never reach a finished state. Things may change, move, or never be resolved. +</p> +<p> + This site's existence and design was inspired by <a href="https://wiki.xxiivv.com/site/home.html">Devine Lu Linvega's wiki</a>, <a href="https://100r.co/site/home.html">Hundred Rabbits</a>, and <a href="https://webring.xxiivv.com/">the many other personal sites</a> of the Merveilles collective. +</p> {{ end }} {{ define "scripts" }}
M
readme.md
→
readme.md
@@ -29,7 +29,5 @@ #### Creating a new page
Add a new name to `.site` at its proper place in the hierarchy and rerun `./build`. A new file will be created in the `/pages` source directory with the proper template tags. ### TODOs -- Fast rebuild when serving locally using `-s` (press Enter to rebuild?) - Sitemap/index of all pages -- Backlinks - Typography styling pass