From 2bcd3050f8d0808d48c95456e8f14c16036d97b3 Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Wed, 24 Mar 2021 16:30:42 -0400 Subject: [PATCH] fix tags and list page --- config.toml | 1 + content/8values.md | 1 - content/_index.md | 1 + content/antiwitze.md | 1 - content/cold.md | 3 -- content/default-branch-name.md | 6 +-- content/general-update.md | 2 +- content/hey-dere-bub.md | 2 +- content/italy.md | 2 +- content/loading.md | 1 - content/mastodon-postgres-upgrade-fun.md | 4 +- content/mastodon.md | 2 +- content/more-drone-photos.md | 1 - content/networking-nonsense.md | 2 +- content/november-13-post-mortem.md | 4 +- content/pop-quiz.md | 2 - content/posts/_index.md | 3 ++ content/proactive-redundancy.md | 2 +- content/raid-nonsense.md | 2 +- content/tags/_index.md | 3 ++ content/tools-and-services.md | 2 +- content/vr.md | 1 - content/weechat-setup.md | 2 +- fix_dates.sh | 15 ++++++ themes/gruvbox/archetypes/default.md | 4 +- themes/gruvbox/layouts/_default/baseof.html | 10 +++- themes/gruvbox/layouts/_default/list.html | 19 ++++--- themes/gruvbox/layouts/_default/single.html | 13 ++--- themes/gruvbox/layouts/_default/summary.html | 8 ++- themes/gruvbox/layouts/_default/taxonomy.html | 11 ++++ themes/gruvbox/layouts/_default/terms.html | 11 ++-- themes/gruvbox/layouts/index.html | 7 +++ themes/gruvbox/layouts/partials/head.html | 7 --- themes/gruvbox/layouts/partials/tags.html | 10 ++++ themes/gruvbox/static/css/gruvbox.css | 54 ------------------- 35 files changed, 107 insertions(+), 112 deletions(-) create mode 100644 content/posts/_index.md create mode 100644 content/tags/_index.md create mode 100644 fix_dates.sh create mode 100644 themes/gruvbox/layouts/_default/taxonomy.html delete mode 100644 themes/gruvbox/layouts/partials/head.html create mode 100644 themes/gruvbox/layouts/partials/tags.html delete mode 100644 themes/gruvbox/static/css/gruvbox.css diff --git a/config.toml b/config.toml index 3cf3496..e834275 100644 --- a/config.toml +++ b/config.toml @@ -3,6 +3,7 @@ languageCode = "en-us" title = "blog // ~ben" theme = "gruvbox" uglyurls = true +summaryLength = 30 [taxonomies] tag = "tags" diff --git a/content/8values.md b/content/8values.md index d3ddd80..56e03a0 100644 --- a/content/8values.md +++ b/content/8values.md @@ -2,7 +2,6 @@ title: '8values' date: 2018-01-03T12:41:09 tags: -- '8values' - 'ideology' - 'politics' --- diff --git a/content/_index.md b/content/_index.md index d8b4b42..296ae91 100644 --- a/content/_index.md +++ b/content/_index.md @@ -4,3 +4,4 @@ title: 'blog // ~ben' a blog about tildes and stuff +--- diff --git a/content/antiwitze.md b/content/antiwitze.md index a501bd2..62b6e61 100644 --- a/content/antiwitze.md +++ b/content/antiwitze.md @@ -4,7 +4,6 @@ date: 2017-11-27T16:58:17 tags: - 'german' - 'jokes' -- 'antiwitze' --- - uebern berg ist schneller als zu fuss sagte der wanderer und schwamm diff --git a/content/cold.md b/content/cold.md index 8f3dea6..44bd1ea 100644 --- a/content/cold.md +++ b/content/cold.md @@ -2,10 +2,7 @@ title: 'cold' date: 2018-01-05T09:49:42 tags: -- 'cold' - 'weather' -- 'winter' -- 'snow' --- why is it so cold diff --git a/content/default-branch-name.md b/content/default-branch-name.md index 0cc88c0..37f698d 100644 --- a/content/default-branch-name.md +++ b/content/default-branch-name.md @@ -1,6 +1,6 @@ --- title: 'default branch name' -date: 2021-01-10T15:26:29 +date: 2020-06-16T15:26:29 tags: - 'git' - 'linux' @@ -11,14 +11,14 @@ changing git’s default branch name has come up recently as an easy action we can take to update our language and remove harmful ideas from our daily usage. + + i’m concerned that this effort to change the language used is ultimately a symbolic gesture to avoid scrutiny into actual change (notably github’s push for this change and continued contracts with ICE). however, it’s an easy change to make. ------------------------------------------------------------------------- - let’s have a look at how to change it for new repos: mkdir -p ~/.config/git/template diff --git a/content/general-update.md b/content/general-update.md index 75b305e..32cb5ac 100644 --- a/content/general-update.md +++ b/content/general-update.md @@ -15,7 +15,7 @@ almost a year since i posted anything at all. i don't have anything in particular to post today so i figured it would be good to give a general update since the last time i posted. ------------------------------------------------------------------------- + we've moved physical hosts again ([/news post](https://tilde.team/news/028_back_up)), which is now a vm on a diff --git a/content/hey-dere-bub.md b/content/hey-dere-bub.md index b17a0b8..eee6198 100644 --- a/content/hey-dere-bub.md +++ b/content/hey-dere-bub.md @@ -16,7 +16,7 @@ logo](https://heyderebub.com/images/itunes_image.jpg)](https://heyderebub.com) 5](https://heyderebub.com/?name=2017-12-13_hey_dere_bub_ep__5.mp3) was uploaded today. ------------------------------------------------------------------------- + we're on [twitter](https://twitter.com/heyderebub), [facebook](https://facebook.com/heyderebub), and of course [our own diff --git a/content/italy.md b/content/italy.md index 18f1b5e..fa0aa45 100644 --- a/content/italy.md +++ b/content/italy.md @@ -16,7 +16,7 @@ the palatine. ![](https://bhh.sh/pub/photos/italy/roman-forum.jpg) ------------------------------------------------------------------------- + here's me standing next to the same piece of ancient rome as i did the last time i visited in 2015. see [my github diff --git a/content/loading.md b/content/loading.md index f67f829..57af74c 100644 --- a/content/loading.md +++ b/content/loading.md @@ -3,7 +3,6 @@ title: 'loading...' date: 2017-12-21T16:09:45 tags: - 'jokes' -- 'humor' --- ``` diff --git a/content/mastodon-postgres-upgrade-fun.md b/content/mastodon-postgres-upgrade-fun.md index 3a0fb6a..613b7c4 100644 --- a/content/mastodon-postgres-upgrade-fun.md +++ b/content/mastodon-postgres-upgrade-fun.md @@ -4,7 +4,7 @@ date: 2020-10-28T16:31:39 tags: - 'sysadmin' - 'tilde' -- 'social-networks' +- 'social' --- howdy friends! @@ -15,7 +15,7 @@ recently. here’s a quick recap of what went down during the upgrade process. ------------------------------------------------------------------------- + we run the current stable version of postgresql from the [postgres apt repos](https://wiki.postgresql.org/wiki/Apt). postgres diff --git a/content/mastodon.md b/content/mastodon.md index df818b1..2bfff44 100644 --- a/content/mastodon.md +++ b/content/mastodon.md @@ -2,7 +2,7 @@ title: 'mastodon' date: 2017-12-22T16:28:45 tags: -- 'social-networks' +- 'social' - 'mastodon' - 'tilde' --- diff --git a/content/more-drone-photos.md b/content/more-drone-photos.md index 62045a8..ff21d42 100644 --- a/content/more-drone-photos.md +++ b/content/more-drone-photos.md @@ -2,7 +2,6 @@ title: 'more drone photos' date: 2018-07-15T23:15:46 tags: -- 'dji' - 'drone' - 'photography' --- diff --git a/content/networking-nonsense.md b/content/networking-nonsense.md index 2051b9b..745d89e 100644 --- a/content/networking-nonsense.md +++ b/content/networking-nonsense.md @@ -11,7 +11,7 @@ i've recently been working on setting up [drone ci](https://drone.tildegit.org) on the tilde.team machine. however, there's been something strange going on with the networking on there. ------------------------------------------------------------------------- + starting up drone with [docker-compose](https://tildegit.org/tildeverse/drone/src/branch/master/docker-compose.yml) diff --git a/content/november-13-post-mortem.md b/content/november-13-post-mortem.md index 740eedc..529c159 100644 --- a/content/november-13-post-mortem.md +++ b/content/november-13-post-mortem.md @@ -13,10 +13,10 @@ i awoke, not suspecting anything to be amiss. as soon as i logged in to check my email and irc mentions, it became clear. tilde.team was at the least inaccessible, and at the worst, down -completely. according the message in my inbox, there hade been an +completely. according the message in my inbox, there had been an attempted "attack" from my IP. ------------------------------------------------------------------------- + > We have indications that there was an attack from your server. Please > take all necessary measures to avoid this in the future and to solve diff --git a/content/pop-quiz.md b/content/pop-quiz.md index 8d90ee4..30a3056 100644 --- a/content/pop-quiz.md +++ b/content/pop-quiz.md @@ -2,10 +2,8 @@ title: 'pop quiz' date: 2018-01-16T17:26:40 tags: -- '4k-gaming' - 'gaming' - 'gtx1080ti' -- 'pc-master-race' --- is this real? diff --git a/content/posts/_index.md b/content/posts/_index.md new file mode 100644 index 0000000..e4114cf --- /dev/null +++ b/content/posts/_index.md @@ -0,0 +1,3 @@ +--- +title: all posts +--- diff --git a/content/proactive-redundancy.md b/content/proactive-redundancy.md index 21ef052..28f4c9e 100644 --- a/content/proactive-redundancy.md +++ b/content/proactive-redundancy.md @@ -12,7 +12,7 @@ it's still a large spof (single-point-of-failure), but i'm reasonably certain that at least the irc net will remain up and functional in the event of another outage. ------------------------------------------------------------------------- + the first thing that i set up was a handful of additional ircd nodes: see [the tilde.chat wiki](https://tilde.chat/wiki/?page=servers) for a diff --git a/content/raid-nonsense.md b/content/raid-nonsense.md index 95371d8..a400389 100644 --- a/content/raid-nonsense.md +++ b/content/raid-nonsense.md @@ -11,7 +11,7 @@ last week i did some tilde.team box. probably should have written about it sooner but i didn't make time for it until now. ------------------------------------------------------------------------- + the gist of the problem was that the default images provided by [hetzner](https://hetzner.com) default to raid1 between the available diff --git a/content/tags/_index.md b/content/tags/_index.md new file mode 100644 index 0000000..2a0da1d --- /dev/null +++ b/content/tags/_index.md @@ -0,0 +1,3 @@ +--- +title: all tags +--- diff --git a/content/tools-and-services.md b/content/tools-and-services.md index 80ab431..d3bbe87 100644 --- a/content/tools-and-services.md +++ b/content/tools-and-services.md @@ -10,7 +10,7 @@ inspired by [tomasino](https://tomasino.org)'s recent [post](%20https://labs.tomasino.org/freelancing-tools-services/), i'd like to detail some of the stuff that i rent and use. ------------------------------------------------------------------------- + ## recurring costs diff --git a/content/vr.md b/content/vr.md index df3625b..71e1086 100644 --- a/content/vr.md +++ b/content/vr.md @@ -3,7 +3,6 @@ title: 'vr' date: 2017-12-18T13:36:04 tags: - 'vr' -- 'virtual-reality' - 'gaming' --- diff --git a/content/weechat-setup.md b/content/weechat-setup.md index 441ba72..30afc87 100644 --- a/content/weechat-setup.md +++ b/content/weechat-setup.md @@ -14,7 +14,7 @@ what options do you need to set? what plugins? what scripts? i'll go over some of the most essential of these, and share my full configs. ------------------------------------------------------------------------- + ## options diff --git a/fix_dates.sh b/fix_dates.sh new file mode 100644 index 0000000..c5aed93 --- /dev/null +++ b/fix_dates.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +set -e + +for i in ./*.md; do + if [ "$(basename "$i")" = _index.md ]; then + continue + fi + + timestamp=$(grep "^date:" "$i" | cut -d ' ' -f 2 | xargs echo -n) + printf "%s: %s " "$i" "$timestamp" + formatted_date=$(python3 -c "print(__import__('datetime').datetime.strptime('$timestamp', '%Y%m%d%H%M.%S').isoformat())") + printf "%s\n" "$formatted_date" + sed -i'' "s/$timestamp/$formatted_date/" "$i" +done diff --git a/themes/gruvbox/archetypes/default.md b/themes/gruvbox/archetypes/default.md index ac36e06..a845151 100644 --- a/themes/gruvbox/archetypes/default.md +++ b/themes/gruvbox/archetypes/default.md @@ -1,2 +1,2 @@ -+++ -+++ +--- +--- diff --git a/themes/gruvbox/layouts/_default/baseof.html b/themes/gruvbox/layouts/_default/baseof.html index a7b06cc..417e5e1 100644 --- a/themes/gruvbox/layouts/_default/baseof.html +++ b/themes/gruvbox/layouts/_default/baseof.html @@ -1,10 +1,16 @@ - {{- partial "head.html" . -}} + + + + + {{- block "title" . }}{{ .Site.Title }}{{ end -}} + +
{{- partial "header.html" . -}} - {{- block "main" . }}{{- end }} + {{- block "main" . }}{{ end -}} {{- partial "footer.html" . -}}
diff --git a/themes/gruvbox/layouts/_default/list.html b/themes/gruvbox/layouts/_default/list.html index 57bd67f..30ddec6 100644 --- a/themes/gruvbox/layouts/_default/list.html +++ b/themes/gruvbox/layouts/_default/list.html @@ -1,10 +1,17 @@ +{{ define "title" }}{{ .Title | lower }} – {{ .Site.Title }}{{ end }} + {{ define "main" }} -

posts

- {{ range .Pages }} -
-

{{ .Title }}

- {{ .Content }} -
+

{{ .Title | lower }}

+ + {{ .Content }} + + {{ end }} diff --git a/themes/gruvbox/layouts/_default/single.html b/themes/gruvbox/layouts/_default/single.html index 1406102..0333e01 100644 --- a/themes/gruvbox/layouts/_default/single.html +++ b/themes/gruvbox/layouts/_default/single.html @@ -1,10 +1,11 @@ -{{ define "title" }} - {{ .Title }} – {{ .Site.Title }} -{{ end }} -{{ define "main" }} -

{{ .Title }}

+{{ define "title" }}{{ .Title }}{{ end }} -

{{ .Date }}

+{{ define "main" }} +

{{ .Title }}

+ + +

tags:

+ {{ partial "tags.html" . }}
{{ .Content }} diff --git a/themes/gruvbox/layouts/_default/summary.html b/themes/gruvbox/layouts/_default/summary.html index 0d46193..b693811 100644 --- a/themes/gruvbox/layouts/_default/summary.html +++ b/themes/gruvbox/layouts/_default/summary.html @@ -1,7 +1,11 @@
-

{{ .Title }}

- {{ .Summary }} +

+ {{ .Title }} + +

+ +

{{ .Summary }}

{{ if .Truncated }}
diff --git a/themes/gruvbox/layouts/_default/taxonomy.html b/themes/gruvbox/layouts/_default/taxonomy.html new file mode 100644 index 0000000..5507852 --- /dev/null +++ b/themes/gruvbox/layouts/_default/taxonomy.html @@ -0,0 +1,11 @@ +{{ define "main" }} +

posts tagged: {{ .Title }}

+
    + {{ range .Data.Pages }} +
  • + {{ .Title }} + +
  • + {{ end }} +
+{{ end }} diff --git a/themes/gruvbox/layouts/_default/terms.html b/themes/gruvbox/layouts/_default/terms.html index 351b2cd..8c71c49 100644 --- a/themes/gruvbox/layouts/_default/terms.html +++ b/themes/gruvbox/layouts/_default/terms.html @@ -1,14 +1,11 @@ -{{ define "header" }} - {{ partial "header.html" . }} -{{ end }} +{{ define "title" }}{{ .Title | lower }} – {{ .Site.Title }}{{ end }} -{{ define "content" }} -

{{ .Title }}

+{{ define "main" }} +

{{ .Title | lower }}

{{ .Content }} - {{ range sort .Site.Taxonomies.tags }} - {{ .Page.Title }} ({{ .Count }}) + ~> {{ .Page.Title }} ({{ .Count }})
{{ end }} {{ end }} diff --git a/themes/gruvbox/layouts/index.html b/themes/gruvbox/layouts/index.html index 2f515ad..02f4dae 100644 --- a/themes/gruvbox/layouts/index.html +++ b/themes/gruvbox/layouts/index.html @@ -11,6 +11,13 @@
{{ range first 10 .Pages }} {{ .Render "summary" }} +
{{ end }}
+
+ all tags ~ + all posts ~ + rss +
+
{{ end }} diff --git a/themes/gruvbox/layouts/partials/head.html b/themes/gruvbox/layouts/partials/head.html deleted file mode 100644 index f378e56..0000000 --- a/themes/gruvbox/layouts/partials/head.html +++ /dev/null @@ -1,7 +0,0 @@ - - - - - {{ block "title" . }}{{ .Site.Title }}{{ end }} - - diff --git a/themes/gruvbox/layouts/partials/tags.html b/themes/gruvbox/layouts/partials/tags.html new file mode 100644 index 0000000..96fa527 --- /dev/null +++ b/themes/gruvbox/layouts/partials/tags.html @@ -0,0 +1,10 @@ +{{ $taxonomy := "tags" }} {{ with .Param $taxonomy }} +
    + {{ range $index, $tag := .}} {{ with $.Site.GetPage (printf "/%s/%s" $taxonomy $tag) -}} +
  • + {{ $tag | urlize }} +
  • + {{- end -}} {{- end -}} +
+{{ end }} + diff --git a/themes/gruvbox/static/css/gruvbox.css b/themes/gruvbox/static/css/gruvbox.css deleted file mode 100644 index a1098a3..0000000 --- a/themes/gruvbox/static/css/gruvbox.css +++ /dev/null @@ -1,54 +0,0 @@ -main { - -webkit-font-feature-settings: "liga" on, "calt" on; - -webkit-font-smoothing: antialiased; - text-rendering: optimizeLegibility; - font-family: 'JetBrains Mono', 'Input Mono', monospace; - max-width: 38rem; - padding: 2rem; - margin: auto; -} - -@media only screen and (max-device-width: 736px) { - main { - padding: 0rem; - } -} - -::selection { - background: #d3869b; -} - -body { - background: #282828; - color: #ebdbb2; -} - -pre { - background-color: #3c3836; - padding: 1em; - border: 0; -} - -a, a:active, a:visited { - color: #e491b6; - background-color: #1d2021; -} - -h1, h2, h3, h4, h5 { - margin-bottom: .1rem; -} - -blockquote { - border-left: 1px solid #bdae93; - margin: 0.5em 10px; - padding: 0.5em 10px; -} - -footer { - align: center; -} - -img { - max-width: 100%; -} -