projects
/
website.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
edbf8af
)
replacing hyphens with spaces in post names
author
MatthewOwens
<matthew@owens.tech>
Tue, 21 Jul 2020 16:46:50 +0000
(17:46 +0100)
committer
MatthewOwens
<matthew@owens.tech>
Tue, 21 Jul 2020 16:46:50 +0000
(17:46 +0100)
scripts/posts.awk
patch
|
blob
|
history
diff --git
a/scripts/posts.awk
b/scripts/posts.awk
index
b78d008
..
4f29e6a
100644
(file)
--- a/
scripts/posts.awk
+++ b/
scripts/posts.awk
@@
-6,7
+6,8
@@
BEGIN {
{
file = sprintf("%s-%s-%s-%s", $1, $2, $3, $4)
- string = sprintf("%s/%s/%s - %s", $1, $2, $3, $4)
+ name = gensub(/-/, " ", "g", $4)
+ string = sprintf("%s/%s/%s - %s", $1, $2, $3, name)
printf("\t<div id=\"post-list-item\"><a href=\"/posts/%s.html\">%s</a></div>\n", file, string)
}