aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Stück <adam@adast.dk>2024-08-09 13:29:53 +0200
committerAdam Stück <adam@adast.dk>2024-08-09 13:29:53 +0200
commit1197d030237a324ed08dc37775af359cdb53eb9d (patch)
treecb51fc9c5c5880309001bb55dfee5d50437fe624
parentfbcf873c55862b4c16234acd3a681fefad5be0ca (diff)
barf: drop trailing slash from post links
-rwxr-xr-xbarf2
1 files changed, 1 insertions, 1 deletions
diff --git a/barf b/barf
index f77512d..098ee07 100755
--- a/barf
+++ b/barf
@@ -39,7 +39,7 @@ index_html() {
# Posts
while read -r f title created; do
- link=$(echo "$f" | sed -E 's|.*/(.*).md|\1/|')
+ link=$(echo "$f" | sed -E 's|.*/(.*).md|/\1|')
created=$(echo $(head -3 "$f" | tail -1))
echo "<li><span>$created</span><a href=\"$link\">$title</a></li>"
done < "$1" | sort -r