35 changed files with 106 additions and 111 deletions
@ -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 |
@ -1,10 +1,17 @@
|
||||
{{ define "title" }}{{ .Title | lower }} – {{ .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> – |
||||
<time>{{ .Date.Format "2006-01-02" }}</time> |
||||
</li> |
||||
{{ end }} |
||||
</ul> |
||||
{{ end }} |
||||
|
||||
|
@ -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 }} |
@ -1,14 +1,11 @@
|
||||
{{ define "header" }} |
||||
{{ partial "header.html" . }} |
||||
{{ end }} |
||||
{{ define "title" }}{{ .Title | lower }} – {{ .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> |
||||
~> <a class="badge badge-tag-list-page" href="{{ .Page.Permalink }}">{{ .Page.Title }}</a> ({{ .Count }})<br> |
||||
{{ end }} |
||||
{{ end }} |
||||
|
||||
|
@ -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> |
||||
|
@ -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 }} |
||||
|
@ -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…
Reference in new issue