Browse Source

fix tags and list page

main
Ben Harris 1 year ago
parent
commit
2bcd3050f8
  1. 1
      config.toml
  2. 1
      content/8values.md
  3. 1
      content/_index.md
  4. 1
      content/antiwitze.md
  5. 3
      content/cold.md
  6. 6
      content/default-branch-name.md
  7. 2
      content/general-update.md
  8. 2
      content/hey-dere-bub.md
  9. 2
      content/italy.md
  10. 1
      content/loading.md
  11. 4
      content/mastodon-postgres-upgrade-fun.md
  12. 2
      content/mastodon.md
  13. 1
      content/more-drone-photos.md
  14. 2
      content/networking-nonsense.md
  15. 4
      content/november-13-post-mortem.md
  16. 2
      content/pop-quiz.md
  17. 3
      content/posts/_index.md
  18. 2
      content/proactive-redundancy.md
  19. 2
      content/raid-nonsense.md
  20. 3
      content/tags/_index.md
  21. 2
      content/tools-and-services.md
  22. 1
      content/vr.md
  23. 2
      content/weechat-setup.md
  24. 15
      fix_dates.sh
  25. 4
      themes/gruvbox/archetypes/default.md
  26. 10
      themes/gruvbox/layouts/_default/baseof.html
  27. 19
      themes/gruvbox/layouts/_default/list.html
  28. 11
      themes/gruvbox/layouts/_default/single.html
  29. 8
      themes/gruvbox/layouts/_default/summary.html
  30. 11
      themes/gruvbox/layouts/_default/taxonomy.html
  31. 11
      themes/gruvbox/layouts/_default/terms.html
  32. 7
      themes/gruvbox/layouts/index.html
  33. 7
      themes/gruvbox/layouts/partials/head.html
  34. 10
      themes/gruvbox/layouts/partials/tags.html
  35. 54
      themes/gruvbox/static/css/gruvbox.css

1
config.toml

@ -3,6 +3,7 @@ languageCode = "en-us"
title = "blog // ~ben"
theme = "gruvbox"
uglyurls = true
summaryLength = 30
[taxonomies]
tag = "tags"

1
content/8values.md

@ -2,7 +2,6 @@
title: '8values'
date: 2018-01-03T12:41:09
tags:
- '8values'
- 'ideology'
- 'politics'
---

1
content/_index.md

@ -4,3 +4,4 @@ title: 'blog // ~ben'
a blog about tildes and stuff
---

1
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

3
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

6
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.
<!-- more -->
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

2
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.
------------------------------------------------------------------------
<!-- more -->
we've moved physical hosts again ([/news
post](https://tilde.team/news/028_back_up)), which is now a vm on a

2
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.
------------------------------------------------------------------------
<!-- more -->
we're on [twitter](https://twitter.com/heyderebub),
[facebook](https://facebook.com/heyderebub), and of course [our own

2
content/italy.md

@ -16,7 +16,7 @@ the palatine.
![](https://bhh.sh/pub/photos/italy/roman-forum.jpg)
------------------------------------------------------------------------
<!-- more -->
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

1
content/loading.md

@ -3,7 +3,6 @@ title: 'loading...'
date: 2017-12-21T16:09:45
tags:
- 'jokes'
- 'humor'
---
```

4
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.
------------------------------------------------------------------------
<!-- more -->
we run the current stable version of postgresql from the [postgres apt
repos](https://wiki.postgresql.org/wiki/Apt). postgres

2
content/mastodon.md

@ -2,7 +2,7 @@
title: 'mastodon'
date: 2017-12-22T16:28:45
tags:
- 'social-networks'
- 'social'
- 'mastodon'
- 'tilde'
---

1
content/more-drone-photos.md

@ -2,7 +2,6 @@
title: 'more drone photos'
date: 2018-07-15T23:15:46
tags:
- 'dji'
- 'drone'
- 'photography'
---

2
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.
------------------------------------------------------------------------
<!-- more -->
starting up drone with
[docker-compose](https://tildegit.org/tildeverse/drone/src/branch/master/docker-compose.yml)

4
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.
------------------------------------------------------------------------
<!-- more -->
> 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

2
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?

3
content/posts/_index.md

@ -0,0 +1,3 @@
---
title: all posts
---

2
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.
------------------------------------------------------------------------
<!-- more -->
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

2
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.
------------------------------------------------------------------------
<!-- more -->
the gist of the problem was that the default images provided by
[hetzner](https://hetzner.com) default to raid1 between the available

3
content/tags/_index.md

@ -0,0 +1,3 @@
---
title: all tags
---

2
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.
------------------------------------------------------------------------
<!-- more -->
## recurring costs

1
content/vr.md

@ -3,7 +3,6 @@ title: 'vr'
date: 2017-12-18T13:36:04
tags:
- 'vr'
- 'virtual-reality'
- 'gaming'
---

2
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.
------------------------------------------------------------------------
<!-- more -->
## options

15
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

4
themes/gruvbox/archetypes/default.md

@ -1,2 +1,2 @@
+++
+++
---
---

10
themes/gruvbox/layouts/_default/baseof.html

@ -1,10 +1,16 @@
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">
{{- partial "head.html" . -}}
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="https://tilde.team/~ben/gruvbox/gruvbox.min.css">
<title>{{- block "title" . }}{{ .Site.Title }}{{ end -}}</title>
</head>
<body>
<main>
{{- partial "header.html" . -}}
{{- block "main" . }}{{- end }}
{{- block "main" . }}{{ end -}}
{{- partial "footer.html" . -}}
</main>
</body>

19
themes/gruvbox/layouts/_default/list.html

@ -1,10 +1,17 @@
{{ define "title" }}{{ .Title | lower }} &ndash; {{ .Site.Title }}{{ end }}
{{ define "main" }}
<h1>posts</h1>
{{ range .Pages }}
<article>
<h2>{{ .Title }}</h2>
{{ .Content }}
</article>
<h1>{{ .Title | lower }}</h1>
{{ .Content }}
<ul>
{{ range .Site.RegularPages }}
<li>
<a href="{{ .RelPermalink }}">{{ .Title }}</a> &ndash;
<time>{{ .Date.Format "2006-01-02" }}</time>
</li>
{{ end }}
</ul>
{{ end }}

11
themes/gruvbox/layouts/_default/single.html

@ -1,10 +1,11 @@
{{ define "title" }}
{{ .Title }} &ndash; {{ .Site.Title }}
{{ end }}
{{ define "title" }}{{ .Title }}{{ end }}
{{ define "main" }}
<h1>{{ .Title }}</h1>
<h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1>
<p>{{ .Date }}</p>
<time>{{ .Date.Format "Mon, 02 Jan 2006 15:04 MST" }}</time>
<p>tags:</p>
{{ partial "tags.html" . }}
<hr>
{{ .Content }}

8
themes/gruvbox/layouts/_default/summary.html

@ -1,7 +1,11 @@
<article>
<div>
<h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
{{ .Summary }}
<h2>
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
<small><time>{{ .Date.Format "2006-01-02" }}</time></small>
</h2>
<p>{{ .Summary }}</p>
</div>
{{ if .Truncated }}
<div>

11
themes/gruvbox/layouts/_default/taxonomy.html

@ -0,0 +1,11 @@
{{ define "main" }}
<h1>posts tagged: {{ .Title }}</h1>
<ul>
{{ range .Data.Pages }}
<li>
<a href="../{{ .Permalink }}">{{ .Title }}</a>
<time>{{ .Date.Format "2006-01-02" }}</time>
</li>
{{ end }}
</ul>
{{ end }}

11
themes/gruvbox/layouts/_default/terms.html

@ -1,14 +1,11 @@
{{ define "header" }}
{{ partial "header.html" . }}
{{ end }}
{{ define "title" }}{{ .Title | lower }} &ndash; {{ .Site.Title }}{{ end }}
{{ define "content" }}
<h1>{{ .Title }}</h1>
{{ define "main" }}
<h1>{{ .Title | lower }}</h1>
{{ .Content }}
<!-- range all pages sorted by their title -->
{{ range sort .Site.Taxonomies.tags }}
<a class="badge badge-tag-list-page" href="{{ .Page.Permalink }}">{{ .Page.Title }} ({{ .Count }})</a>
~&gt; <a class="badge badge-tag-list-page" href="{{ .Page.Permalink }}">{{ .Page.Title }}</a> ({{ .Count }})<br>
{{ end }}
{{ end }}

7
themes/gruvbox/layouts/index.html

@ -11,6 +11,13 @@
<div>
{{ range first 10 .Pages }}
{{ .Render "summary" }}
<hr>
{{ end }}
</div>
<center>
<a href="tags.html">all tags</a> ~
<a href="posts.html">all posts</a> ~
<a href="index.xml">rss</a>
</center>
<br>
{{ end }}

7
themes/gruvbox/layouts/partials/head.html

@ -1,7 +0,0 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="https://tilde.team/~ben/gruvbox/gruvbox.min.css">
<title>{{ block "title" . }}{{ .Site.Title }}{{ end }}</title>
</head>

10
themes/gruvbox/layouts/partials/tags.html

@ -0,0 +1,10 @@
{{ $taxonomy := "tags" }} {{ with .Param $taxonomy }}
<ul>
{{ range $index, $tag := .}} {{ with $.Site.GetPage (printf "/%s/%s" $taxonomy $tag) -}}
<li>
<a href="{{ .RelPermalink }}">{{ $tag | urlize }}</a>
</li>
{{- end -}} {{- end -}}
</ul>
{{ end }}

54
themes/gruvbox/static/css/gruvbox.css

@ -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%;
}
Loading…
Cancel
Save