commit e19eb92b4b504a7a3411e208ca23d628c6329ba4 Author: Alex Selimov Date: Thu Aug 13 16:31:11 2026 -0400 Initial version of hugo-stack diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..46f5006 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +public/* diff --git a/.hugo_build.lock b/.hugo_build.lock new file mode 100644 index 0000000..e69de29 diff --git a/README.md b/README.md new file mode 100644 index 0000000..56934df --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +# Hugo Stack + + +>Show off your cool full stack + +This repo provides a Hugo partial and shortcode that generates a graphic that shows off your stack. + diff --git a/exampleSite/.hugo_build.lock b/exampleSite/.hugo_build.lock new file mode 100644 index 0000000..e69de29 diff --git a/exampleSite/data/stack.yaml b/exampleSite/data/stack.yaml new file mode 100644 index 0000000..ec060ac --- /dev/null +++ b/exampleSite/data/stack.yaml @@ -0,0 +1,28 @@ +- section: Code Editing + description: "Full stack tools for editing code" + items: + - name: ChocV + description: Sick keyboard. Super minimal keyboard with choc silver switches. + - name: 3-D Printed + Handwired Atreus + image: "/atreus.webp" + description: Homemade 36% keyboard with Glorious Panda switches and MT3 Dusk keycaps + - name: Nulea M505 Trackball Mouse + image: "/nulea.webp" + description: | + Smooth operation and long battery life + - name: Ghostty + Tmux + Neovim + Zenwritten theme + image: "/editor.webp" + description: Best stack for efficiently working on code. Monochromatic theme surprisingly helps with focus instead of staring at a rainbow all day. +- section: Building Tools + items: + - name: Macbook Pro M1 Max 64GB + image: "/macbook.webp" + description: "Was gifted this, really missing Linux but getting a high powered Linux laptop in 2026 seems unlikely" +- section: Fuel + description: "Human fuel to keep the code coming" + items: + - name: Warped Serie Gran Reserva 1988 + image: "/warped.webp" + description: "Nice for improving focus during chill late night code sessions" + - name: Kalita Wave + Fellow Move + description: "Favorite pour-over coffee setup using the Scott Rao recipe" diff --git a/exampleSite/hugo.toml b/exampleSite/hugo.toml new file mode 100644 index 0000000..19f0ec1 --- /dev/null +++ b/exampleSite/hugo.toml @@ -0,0 +1,6 @@ +baseURL = 'http://localhost:1313/' +languageCode = 'en-us' +title = 'Stack Example' + +[params] +accentColor = "#EF9F27" diff --git a/exampleSite/layouts/_default/_markup/render-codeblock.html b/exampleSite/layouts/_default/_markup/render-codeblock.html new file mode 100644 index 0000000..6e1a075 --- /dev/null +++ b/exampleSite/layouts/_default/_markup/render-codeblock.html @@ -0,0 +1,6 @@ + +{{ .Page.Store.Set "hasCodeBlock" true }} + + +{{ $result := transform.HighlightCodeBlock . }} +{{ $result.Wrapped }} \ No newline at end of file diff --git a/exampleSite/layouts/_default/baseof.html b/exampleSite/layouts/_default/baseof.html new file mode 100644 index 0000000..736dd22 --- /dev/null +++ b/exampleSite/layouts/_default/baseof.html @@ -0,0 +1,26 @@ + + + + + + + + + + + +
+
+ {{- block "main" . }}{{- end }} +
+
+ + + + diff --git a/exampleSite/layouts/_default/list.html b/exampleSite/layouts/_default/list.html new file mode 100644 index 0000000..e6cc177 --- /dev/null +++ b/exampleSite/layouts/_default/list.html @@ -0,0 +1,36 @@ +{{ define "main" }} + + {{ if .Data.Singular }} +

{{ i18n "filtering-for" }} "{{ .Title }}"

+ {{ end }} + + {{ if not .Data.Singular }} +
+ {{ range .Site.Taxonomies.tags }} + #{{ lower .Page.Title }} + {{ end }} +
+ {{ end }} +
+{{ end }} diff --git a/exampleSite/layouts/_default/rss.xml b/exampleSite/layouts/_default/rss.xml new file mode 100644 index 0000000..f35b51a --- /dev/null +++ b/exampleSite/layouts/_default/rss.xml @@ -0,0 +1,64 @@ +{{- $authorEmail := "" }} +{{- with site.Params.author }} + {{- if reflect.IsMap . }} + {{- with .email }} + {{- $authorEmail = . }} + {{- end }} + {{- end }} +{{- end }} + +{{- $authorName := "" }} +{{- with site.Params.author }} + {{- if reflect.IsMap . }} + {{- with .name }} + {{- $authorName = . }} + {{- end }} + {{- else }} + {{- $authorName = . }} + {{- end }} +{{- end }} + +{{- $pctx := . }} +{{- if .IsHome }}{{ $pctx = .Site }}{{ end }} +{{- $pages := slice }} +{{- if or $.IsHome $.IsSection }} +{{- $pages = $pctx.RegularPages }} +{{- else }} +{{- $pages = $pctx.Pages }} +{{- end }} +{{- $limit := .Site.Config.Services.RSS.Limit }} +{{- if ge $limit 1 }} +{{- $pages = $pages | first $limit }} +{{- end }} +{{- printf "" | safeHTML }} + + + {{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ .Site.Title }}{{ end }} + {{ .Permalink }} + Recent content {{ if not .IsHome }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ .Site.Title }} + Hugo -- gohugo.io + {{ with site.Language.Lang }} + {{ . }} + {{ else }} + en + {{ end }}{{ with $authorEmail }} + {{.}}{{ with $authorName }} ({{ . }}){{ end }}{{ end }}{{ with $authorEmail }} + {{ . }}{{ with $authorName }} ({{ . }}){{ end }}{{ end }}{{ with .Site.Copyright }} + {{ . }}{{ end }}{{ if not .Date.IsZero }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} + {{- with .OutputFormats.Get "RSS" }} + {{ printf "" .Permalink .MediaType | safeHTML }} + {{- end }} + {{- range $pages }} + + {{ .Title }} + {{ .Permalink }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} + {{- with $authorEmail }}{{ . }}{{ with $authorName }} ({{ . }}){{ end }}{{ end }} + {{ .Permalink }} + {{ .Summary | transform.XMLEscape | safeHTML }} + {{ `` | safeHTML }} + + {{- end }} + + diff --git a/exampleSite/layouts/_default/single.html b/exampleSite/layouts/_default/single.html new file mode 100644 index 0000000..5f5d4db --- /dev/null +++ b/exampleSite/layouts/_default/single.html @@ -0,0 +1,40 @@ +{{ define "main" }} +{{ if not .Params.menu }} +

{{ .Title }}

+{{ if not .Params.hideDate }} +

+ + {{ with .Params.author }}· {{.}}{{ end }} +

+{{ end }} +{{ end }} + + {{ .Content }} + +

+ {{ range (.GetTerms "tags") }} + #{{ lower .LinkTitle }} + {{ end }} +

+{{ if not .Params.hideReply }} +{{ with .Site.Params.author.email }} +

+ + {{ i18n "email-reply" }} ↪ + +

+{{ end }} +{{ end }} +{{ if and .Site.Params.upvotes (not .Params.hideUpvotes) }} +
+ +
+ + +{{ end }} +{{ end }} diff --git a/exampleSite/layouts/index.html b/exampleSite/layouts/index.html new file mode 100644 index 0000000..76b405e --- /dev/null +++ b/exampleSite/layouts/index.html @@ -0,0 +1,5 @@ +{{ define "main" }} + +{{ partial "stack.html" . }} + +{{ end }} diff --git a/exampleSite/public/atreus.webp b/exampleSite/public/atreus.webp new file mode 100644 index 0000000..a323901 Binary files /dev/null and b/exampleSite/public/atreus.webp differ diff --git a/exampleSite/public/categories/index.html b/exampleSite/public/categories/index.html new file mode 100644 index 0000000..2499394 --- /dev/null +++ b/exampleSite/public/categories/index.html @@ -0,0 +1,39 @@ + + + + + + + + + + + +
+
+ + +

"Categories"

+ +
    + +
  • + +
  • + +
+ +
+ +
+
+ + + + diff --git a/exampleSite/public/editor.webp b/exampleSite/public/editor.webp new file mode 100644 index 0000000..870fa61 Binary files /dev/null and b/exampleSite/public/editor.webp differ diff --git a/exampleSite/public/macbook.webp b/exampleSite/public/macbook.webp new file mode 100644 index 0000000..ebab082 Binary files /dev/null and b/exampleSite/public/macbook.webp differ diff --git a/exampleSite/public/nulea.webp b/exampleSite/public/nulea.webp new file mode 100644 index 0000000..ef702c8 Binary files /dev/null and b/exampleSite/public/nulea.webp differ diff --git a/exampleSite/public/sitemap.xml b/exampleSite/public/sitemap.xml new file mode 100644 index 0000000..d98137c --- /dev/null +++ b/exampleSite/public/sitemap.xml @@ -0,0 +1,11 @@ + + + + http://localhost:1313/categories/ + + http://localhost:1313/ + + http://localhost:1313/tags/ + + diff --git a/exampleSite/public/tags/index.html b/exampleSite/public/tags/index.html new file mode 100644 index 0000000..6ec6c46 --- /dev/null +++ b/exampleSite/public/tags/index.html @@ -0,0 +1,39 @@ + + + + + + + + + + + +
+
+ + +

"Tags"

+ +
    + +
  • + +
  • + +
+ +
+ +
+
+ + + + diff --git a/exampleSite/public/warped.webp b/exampleSite/public/warped.webp new file mode 100644 index 0000000..fa9169f Binary files /dev/null and b/exampleSite/public/warped.webp differ diff --git a/exampleSite/static/atreus.webp b/exampleSite/static/atreus.webp new file mode 100644 index 0000000..a323901 Binary files /dev/null and b/exampleSite/static/atreus.webp differ diff --git a/exampleSite/static/editor.webp b/exampleSite/static/editor.webp new file mode 100644 index 0000000..870fa61 Binary files /dev/null and b/exampleSite/static/editor.webp differ diff --git a/exampleSite/static/macbook.webp b/exampleSite/static/macbook.webp new file mode 100644 index 0000000..ebab082 Binary files /dev/null and b/exampleSite/static/macbook.webp differ diff --git a/exampleSite/static/nulea.webp b/exampleSite/static/nulea.webp new file mode 100644 index 0000000..ef702c8 Binary files /dev/null and b/exampleSite/static/nulea.webp differ diff --git a/exampleSite/static/warped.webp b/exampleSite/static/warped.webp new file mode 100644 index 0000000..fa9169f Binary files /dev/null and b/exampleSite/static/warped.webp differ diff --git a/hugo.toml b/hugo.toml new file mode 100644 index 0000000..19f0ec1 --- /dev/null +++ b/hugo.toml @@ -0,0 +1,6 @@ +baseURL = 'http://localhost:1313/' +languageCode = 'en-us' +title = 'Stack Example' + +[params] +accentColor = "#EF9F27" diff --git a/layouts/partials/stack.html b/layouts/partials/stack.html new file mode 100644 index 0000000..707bd4f --- /dev/null +++ b/layouts/partials/stack.html @@ -0,0 +1,172 @@ + + +{{ $.Scratch.Set "counter" 0 }} +{{ range .Site.Data.stack }} +
+

{{ .section }}

+

{{.description}}

+ {{ range .items }} + {{ $i := $.Scratch.Get "counter"}} +
+ {{ with .image }} +
+ +
+ {{end}} +
+

{{ .name }}

+

{{.description | markdownify}}

+
+ {{ $.Scratch.Set "counter" (add ($.Scratch.Get "counter") 1) }} +
+ {{ end }} +
+{{ end }} diff --git a/layouts/shortcodes/stack.html b/layouts/shortcodes/stack.html new file mode 100644 index 0000000..69ff982 --- /dev/null +++ b/layouts/shortcodes/stack.html @@ -0,0 +1 @@ +{{ partial "stack.html" . }}