fix tags and list page

This commit is contained in:
Ben Harris 2021-03-24 16:30:42 -04:00
parent 0b3bc8a85b
commit 2bcd3050f8
35 changed files with 107 additions and 112 deletions

View File

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

View File

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

View File

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

View File

@ -4,7 +4,6 @@ date: 2017-11-27T16:58:17
tags: tags:
- 'german' - 'german'
- 'jokes' - 'jokes'
- 'antiwitze'
--- ---
- uebern berg ist schneller als zu fuss sagte der wanderer und schwamm - uebern berg ist schneller als zu fuss sagte der wanderer und schwamm

View File

@ -2,10 +2,7 @@
title: 'cold' title: 'cold'
date: 2018-01-05T09:49:42 date: 2018-01-05T09:49:42
tags: tags:
- 'cold'
- 'weather' - 'weather'
- 'winter'
- 'snow'
--- ---
why is it so cold why is it so cold

View File

@ -1,6 +1,6 @@
--- ---
title: 'default branch name' title: 'default branch name'
date: 2021-01-10T15:26:29 date: 2020-06-16T15:26:29
tags: tags:
- 'git' - 'git'
- 'linux' - 'linux'
@ -11,14 +11,14 @@ changing gits default branch name has come up recently as an easy
action we can take to update our language and remove harmful ideas from action we can take to update our language and remove harmful ideas from
our daily usage. our daily usage.
<!-- more -->
im concerned that this effort to change the language used is ultimately im concerned that this effort to change the language used is ultimately
a symbolic gesture to avoid scrutiny into actual change (notably a symbolic gesture to avoid scrutiny into actual change (notably
githubs push for this change and continued contracts with ICE). githubs push for this change and continued contracts with ICE).
however, its an easy change to make. however, its an easy change to make.
------------------------------------------------------------------------
lets have a look at how to change it for new repos: lets have a look at how to change it for new repos:
mkdir -p ~/.config/git/template mkdir -p ~/.config/git/template

View File

@ -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 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. be good to give a general update since the last time i posted.
------------------------------------------------------------------------ <!-- more -->
we've moved physical hosts again ([/news we've moved physical hosts again ([/news
post](https://tilde.team/news/028_back_up)), which is now a vm on a post](https://tilde.team/news/028_back_up)), which is now a vm on a

View File

@ -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 5](https://heyderebub.com/?name=2017-12-13_hey_dere_bub_ep__5.mp3) was
uploaded today. uploaded today.
------------------------------------------------------------------------ <!-- more -->
we're on [twitter](https://twitter.com/heyderebub), we're on [twitter](https://twitter.com/heyderebub),
[facebook](https://facebook.com/heyderebub), and of course [our own [facebook](https://facebook.com/heyderebub), and of course [our own

View File

@ -16,7 +16,7 @@ the palatine.
![](https://bhh.sh/pub/photos/italy/roman-forum.jpg) ![](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 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 last time i visited in 2015. see [my github

View File

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

View File

@ -4,7 +4,7 @@ date: 2020-10-28T16:31:39
tags: tags:
- 'sysadmin' - 'sysadmin'
- 'tilde' - 'tilde'
- 'social-networks' - 'social'
--- ---
howdy friends! howdy friends!
@ -15,7 +15,7 @@ recently.
heres a quick recap of what went down during the upgrade process. heres a quick recap of what went down during the upgrade process.
------------------------------------------------------------------------ <!-- more -->
we run the current stable version of postgresql from the [postgres apt we run the current stable version of postgresql from the [postgres apt
repos](https://wiki.postgresql.org/wiki/Apt). postgres repos](https://wiki.postgresql.org/wiki/Apt). postgres

View File

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

View File

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

View File

@ -11,7 +11,7 @@ i've recently been working on setting up [drone
ci](https://drone.tildegit.org) on the tilde.team machine. however, ci](https://drone.tildegit.org) on the tilde.team machine. however,
there's been something strange going on with the networking on there. there's been something strange going on with the networking on there.
------------------------------------------------------------------------ <!-- more -->
starting up drone with starting up drone with
[docker-compose](https://tildegit.org/tildeverse/drone/src/branch/master/docker-compose.yml) [docker-compose](https://tildegit.org/tildeverse/drone/src/branch/master/docker-compose.yml)

View File

@ -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. check my email and irc mentions, it became clear.
tilde.team was at the least inaccessible, and at the worst, down 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. attempted "attack" from my IP.
------------------------------------------------------------------------ <!-- more -->
> We have indications that there was an attack from your server. Please > 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 > take all necessary measures to avoid this in the future and to solve

View File

@ -2,10 +2,8 @@
title: 'pop quiz' title: 'pop quiz'
date: 2018-01-16T17:26:40 date: 2018-01-16T17:26:40
tags: tags:
- '4k-gaming'
- 'gaming' - 'gaming'
- 'gtx1080ti' - 'gtx1080ti'
- 'pc-master-race'
--- ---
is this real? is this real?

3
content/posts/_index.md Normal file
View File

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

View File

@ -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 certain that at least the irc net will remain up and functional in the
event of another outage. event of another outage.
------------------------------------------------------------------------ <!-- more -->
the first thing that i set up was a handful of additional ircd nodes: 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 see [the tilde.chat wiki](https://tilde.chat/wiki/?page=servers) for a

View File

@ -11,7 +11,7 @@ last week i did some
tilde.team box. probably should have written about it sooner but i tilde.team box. probably should have written about it sooner but i
didn't make time for it until now. didn't make time for it until now.
------------------------------------------------------------------------ <!-- more -->
the gist of the problem was that the default images provided by the gist of the problem was that the default images provided by
[hetzner](https://hetzner.com) default to raid1 between the available [hetzner](https://hetzner.com) default to raid1 between the available

3
content/tags/_index.md Normal file
View File

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

View File

@ -10,7 +10,7 @@ inspired by [tomasino](https://tomasino.org)'s recent
[post](%20https://labs.tomasino.org/freelancing-tools-services/), i'd [post](%20https://labs.tomasino.org/freelancing-tools-services/), i'd
like to detail some of the stuff that i rent and use. like to detail some of the stuff that i rent and use.
------------------------------------------------------------------------ <!-- more -->
## recurring costs ## recurring costs

View File

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

View File

@ -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 i'll go over some of the most essential of these, and share my full
configs. configs.
------------------------------------------------------------------------ <!-- more -->
## options ## options

15
fix_dates.sh Normal file
View File

@ -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

View File

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

View File

@ -1,10 +1,16 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}"> <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> <body>
<main> <main>
{{- partial "header.html" . -}} {{- partial "header.html" . -}}
{{- block "main" . }}{{- end }} {{- block "main" . }}{{ end -}}
{{- partial "footer.html" . -}} {{- partial "footer.html" . -}}
</main> </main>
</body> </body>

View File

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

View File

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

View File

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

View File

@ -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 }}

View File

@ -1,14 +1,11 @@
{{ define "header" }} {{ define "title" }}{{ .Title | lower }} &ndash; {{ .Site.Title }}{{ end }}
{{ partial "header.html" . }}
{{ end }}
{{ define "content" }} {{ define "main" }}
<h1>{{ .Title }}</h1> <h1>{{ .Title | lower }}</h1>
{{ .Content }} {{ .Content }}
<!-- range all pages sorted by their title -->
{{ range sort .Site.Taxonomies.tags }} {{ 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 }}
{{ end }} {{ end }}

View File

@ -11,6 +11,13 @@
<div> <div>
{{ range first 10 .Pages }} {{ range first 10 .Pages }}
{{ .Render "summary" }} {{ .Render "summary" }}
<hr>
{{ end }} {{ end }}
</div> </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 }} {{ end }}

View File

@ -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>

View File

@ -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 }}

View File

@ -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%;
}