Initial version of hugo-stack
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
public/*
|
||||
0
.hugo_build.lock
Normal file
7
README.md
Normal file
|
|
@ -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.
|
||||
|
||||
0
exampleSite/.hugo_build.lock
Normal file
28
exampleSite/data/stack.yaml
Normal file
|
|
@ -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"
|
||||
6
exampleSite/hugo.toml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
baseURL = 'http://localhost:1313/'
|
||||
languageCode = 'en-us'
|
||||
title = 'Stack Example'
|
||||
|
||||
[params]
|
||||
accentColor = "#EF9F27"
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
<!-- https://github.com/jmooring/hugo-testing/blob/hugo-forum-topic-40998/layouts/_default/_markup/render-codeblock-katex.html -->
|
||||
{{ .Page.Store.Set "hasCodeBlock" true }}
|
||||
|
||||
<!-- https://www.veriphor.com/articles/code-block-render-hooks/ -->
|
||||
{{ $result := transform.HighlightCodeBlock . }}
|
||||
{{ $result.Wrapped }}
|
||||
26
exampleSite/layouts/_default/baseof.html
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{ with .Site.Language.Lang }}{{ . }}{{ else }}en-US{{ end }}">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="X-Clacks-Overhead" content="GNU Terry Pratchett" />
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<style>
|
||||
.container {
|
||||
padding: 20%;
|
||||
box-sizing: border-box
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
<main id="main-content">
|
||||
<div class="container">
|
||||
{{- block "main" . }}{{- end }}
|
||||
</div>
|
||||
</main>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
36
exampleSite/layouts/_default/list.html
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{{ define "main" }}
|
||||
<content>
|
||||
{{ if .Data.Singular }}
|
||||
<h3 class="blog-filter">{{ i18n "filtering-for" }} "{{ .Title }}"</h3>
|
||||
{{ end }}
|
||||
<ul class="blog-posts">
|
||||
{{ range .Pages }}
|
||||
<li>
|
||||
<span>
|
||||
<i>
|
||||
<time datetime='{{ .Date.Format "2006-01-02" }}' pubdate>
|
||||
{{ .Date.Format (default "2006-01-02" .Site.Params.dateFormat) }}
|
||||
</time>
|
||||
</i>
|
||||
</span>
|
||||
{{ if .Params.link }}
|
||||
<a href="{{ .Params.link }}" target="_blank">{{ .Title }} ↪</a>
|
||||
{{ else }}
|
||||
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||
{{ end }}
|
||||
</li>
|
||||
{{ else }}
|
||||
<li>
|
||||
{{ i18n "no-posts" }}
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ if not .Data.Singular }}
|
||||
<div>
|
||||
{{ range .Site.Taxonomies.tags }}
|
||||
<a class="blog-tags" href="{{ .Page.RelPermalink }}">#{{ lower .Page.Title }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</content>
|
||||
{{ end }}
|
||||
64
exampleSite/layouts/_default/rss.xml
Normal file
|
|
@ -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 "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
|
||||
<channel>
|
||||
<title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ .Site.Title }}{{ end }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<description>Recent content {{ if not .IsHome }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ .Site.Title }}</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
{{ with site.Language.Lang }}
|
||||
<language>{{ . }}</language>
|
||||
{{ else }}
|
||||
<language>en</language>
|
||||
{{ end }}{{ with $authorEmail }}
|
||||
<managingEditor>{{.}}{{ with $authorName }} ({{ . }}){{ end }}</managingEditor>{{ end }}{{ with $authorEmail }}
|
||||
<webMaster>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</webMaster>{{ end }}{{ with .Site.Copyright }}
|
||||
<copyright>{{ . }}</copyright>{{ end }}{{ if not .Date.IsZero }}
|
||||
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
|
||||
{{- with .OutputFormats.Get "RSS" }}
|
||||
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
||||
{{- end }}
|
||||
{{- range $pages }}
|
||||
<item>
|
||||
<title>{{ .Title }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
||||
{{- with $authorEmail }}<author>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</author>{{ end }}
|
||||
<guid>{{ .Permalink }}</guid>
|
||||
<description>{{ .Summary | transform.XMLEscape | safeHTML }}</description>
|
||||
<content:encoded>{{ `<![CDATA[` | safeHTML }}{{ .Content | safeHTML }}{{ `]]>` | safeHTML }}</content:encoded>
|
||||
</item>
|
||||
{{- end }}
|
||||
</channel>
|
||||
</rss>
|
||||
40
exampleSite/layouts/_default/single.html
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{{ define "main" }}
|
||||
{{ if not .Params.menu }}
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ if not .Params.hideDate }}
|
||||
<p class="byline">
|
||||
<time datetime='{{ .Date.Format "2006-01-02" }}' pubdate>
|
||||
{{ .Date.Format (default "2006-01-02" .Site.Params.dateFormat) }}
|
||||
</time>
|
||||
{{ with .Params.author }}· {{.}}{{ end }}
|
||||
</p>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<content>
|
||||
{{ .Content }}
|
||||
</content>
|
||||
<p>
|
||||
{{ range (.GetTerms "tags") }}
|
||||
<a class="blog-tags" href="{{ .RelPermalink }}">#{{ lower .LinkTitle }}</a>
|
||||
{{ end }}
|
||||
</p>
|
||||
{{ if not .Params.hideReply }}
|
||||
{{ with .Site.Params.author.email }}
|
||||
<p>
|
||||
<a href='mailto:{{ . }}?subject={{ i18n "email-subject" }}"{{ default $.Site.Title $.Page.Title }}"'>
|
||||
{{ i18n "email-reply" }} ↪
|
||||
</a>
|
||||
</p>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if and .Site.Params.upvotes (not .Params.hideUpvotes) }}
|
||||
<div class="upvote">
|
||||
<button id="upvote-btn" aria-label="Upvote">
|
||||
<span id="upvote-chevron">⌃</span>
|
||||
<span id="upvote-count">—</span>
|
||||
</button>
|
||||
</div>
|
||||
<script>window.UPVOTE_API = "{{ .Site.Params.upvoteApi }}";</script>
|
||||
<script src="/upvote.js"></script>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
5
exampleSite/layouts/index.html
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{{ define "main" }}
|
||||
|
||||
{{ partial "stack.html" . }}
|
||||
|
||||
{{ end }}
|
||||
BIN
exampleSite/public/atreus.webp
Normal file
|
After Width: | Height: | Size: 53 KiB |
39
exampleSite/public/categories/index.html
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<meta http-equiv="X-Clacks-Overhead" content="GNU Terry Pratchett" />
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<style>
|
||||
.container {
|
||||
padding: 20%;
|
||||
box-sizing: border-box
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
<main id="main-content">
|
||||
<div class="container">
|
||||
<content>
|
||||
|
||||
<h3 class="blog-filter"> "Categories"</h3>
|
||||
|
||||
<ul class="blog-posts">
|
||||
|
||||
<li>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</content>
|
||||
|
||||
</div>
|
||||
</main>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
BIN
exampleSite/public/editor.webp
Normal file
|
After Width: | Height: | Size: 58 KiB |
BIN
exampleSite/public/macbook.webp
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
exampleSite/public/nulea.webp
Normal file
|
After Width: | Height: | Size: 13 KiB |
11
exampleSite/public/sitemap.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
||||
xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
||||
<url>
|
||||
<loc>http://localhost:1313/categories/</loc>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/</loc>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/tags/</loc>
|
||||
</url>
|
||||
</urlset>
|
||||
39
exampleSite/public/tags/index.html
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<meta http-equiv="X-Clacks-Overhead" content="GNU Terry Pratchett" />
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<style>
|
||||
.container {
|
||||
padding: 20%;
|
||||
box-sizing: border-box
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
<main id="main-content">
|
||||
<div class="container">
|
||||
<content>
|
||||
|
||||
<h3 class="blog-filter"> "Tags"</h3>
|
||||
|
||||
<ul class="blog-posts">
|
||||
|
||||
<li>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</content>
|
||||
|
||||
</div>
|
||||
</main>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
BIN
exampleSite/public/warped.webp
Normal file
|
After Width: | Height: | Size: 678 KiB |
BIN
exampleSite/static/atreus.webp
Normal file
|
After Width: | Height: | Size: 53 KiB |
BIN
exampleSite/static/editor.webp
Normal file
|
After Width: | Height: | Size: 58 KiB |
BIN
exampleSite/static/macbook.webp
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
exampleSite/static/nulea.webp
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
exampleSite/static/warped.webp
Normal file
|
After Width: | Height: | Size: 678 KiB |
6
hugo.toml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
baseURL = 'http://localhost:1313/'
|
||||
languageCode = 'en-us'
|
||||
title = 'Stack Example'
|
||||
|
||||
[params]
|
||||
accentColor = "#EF9F27"
|
||||
172
layouts/partials/stack.html
Normal file
|
|
@ -0,0 +1,172 @@
|
|||
<style>
|
||||
|
||||
|
||||
@media(min-width: 800px){
|
||||
.stack_row{
|
||||
position: relative;
|
||||
display: flex;
|
||||
margin-top: 30px;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.stack_item{
|
||||
width: 34%;
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.stack_item_wide{
|
||||
width: 42%;
|
||||
}
|
||||
.stack_item_0{
|
||||
transform: translateX(0%);
|
||||
}
|
||||
|
||||
.stack_item_1{
|
||||
transform: translateX(58%);
|
||||
}
|
||||
|
||||
.stack_item_2{
|
||||
transform: translateX(122%);
|
||||
}
|
||||
|
||||
.stack_item_3{
|
||||
transform: translateX(30%);
|
||||
}
|
||||
|
||||
.stack_item_4{
|
||||
transform: translateX(88%);
|
||||
}
|
||||
|
||||
.stack_item_5{
|
||||
transform: translateX(10%);
|
||||
}
|
||||
|
||||
.stack_item_6{
|
||||
transform: translateX(68%);
|
||||
}
|
||||
|
||||
.stack_item_7{
|
||||
transform: translateX(118%);
|
||||
}
|
||||
|
||||
.stack_item_8{
|
||||
transform: translateX(40%);
|
||||
}
|
||||
|
||||
.stack_item_9{
|
||||
transform: translateX(6%);
|
||||
}
|
||||
|
||||
.stack_item_10{
|
||||
transform: translateX(78%);
|
||||
}
|
||||
|
||||
.stack_item_11{
|
||||
transform: translateX(24%);
|
||||
}
|
||||
|
||||
.stack_item_12{
|
||||
transform: translateX(98%);
|
||||
}
|
||||
.stack_image{
|
||||
width:100%;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.stack_item:not(:has(img)) {
|
||||
width: fit-content;
|
||||
min-width: 20%;
|
||||
max-width: 32%;
|
||||
}
|
||||
|
||||
.stack_item:nth-child(even of .stack_item):not(:has(img)) {
|
||||
max-width: 38%;
|
||||
}
|
||||
}
|
||||
|
||||
.stack_row{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.stack_image{
|
||||
width:100%;
|
||||
box-sizing: border-box;
|
||||
padding: 0px;
|
||||
align: center;
|
||||
}
|
||||
|
||||
.stack_text{
|
||||
width:100%;
|
||||
padding: 0px 5px;
|
||||
box-sizing: border-box;
|
||||
border-left: 4px solid {{ .Site.Params.accentColor }};
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.stack_item{
|
||||
padding: 0px;
|
||||
box-sizing: border-box;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.stack_row::before{
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: -25px;
|
||||
top: 0;
|
||||
bottom: -30px;
|
||||
width: 1px;
|
||||
background: {{ .Site.Params.accentColor }};
|
||||
}
|
||||
|
||||
.stack_header{
|
||||
position: relative;
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
.stack_header::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
|
||||
left: -24px;
|
||||
top: 50%;
|
||||
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
|
||||
background: {{ .Site.Params.accentColor }};
|
||||
border: 2px solid {{ .Site.Params.accentColor }};
|
||||
border-radius: 20px;
|
||||
|
||||
transform: translate(-50%, -50%);
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
{{ $.Scratch.Set "counter" 0 }}
|
||||
{{ range .Site.Data.stack }}
|
||||
<div class = "stack_row">
|
||||
<h2 class="stack_header"> {{ .section }} </h2>
|
||||
<p style="margin: 0px;">{{.description}}</p>
|
||||
{{ range .items }}
|
||||
{{ $i := $.Scratch.Get "counter"}}
|
||||
<div class='stack_item stack_item_{{mod $i 13}} {{ if mod $i 2}} stack_item_wide {{end}}'>
|
||||
{{ with .image }}
|
||||
<div class = "stack_image">
|
||||
<img src={{.}} style="width:100%; align:center; display: block;"/>
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="stack_text">
|
||||
<h3 style="margin: 0px;"> {{ .name }} </h3>
|
||||
<p style="margin: 0px;">{{.description | markdownify}}</p>
|
||||
</div>
|
||||
{{ $.Scratch.Set "counter" (add ($.Scratch.Get "counter") 1) }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
1
layouts/shortcodes/stack.html
Normal file
|
|
@ -0,0 +1 @@
|
|||
{{ partial "stack.html" . }}
|
||||