paritybit.ca

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit a501da57f7ede94525ea100787d3725d5bb2ca65
parent 2f61a86d85a95cd990a0520f7005adb7cfa04cfd
Author: Jake Bauer <jbauer@paritybit.ca>
Date:   Fri, 14 Feb 2020 22:27:40 -0500

Fix bug where new blog entry would be added for every year

Diffstat:
Mpages/blog.md | 1-
Mpublish | 3++-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/pages/blog.md b/pages/blog.md @@ -21,7 +21,6 @@ thoughts and ideas. You can find links to other blogs that I follow on my ### 2019 <ul> - <li>2020-02-06 <a href="blog/website-redesign">Making My Website More Accessible</a></li> <li>2019-12-30 <a href="blog/automating-publishing">Automating the Publishing of Articles</a></li> <li>2019-12-21 <a href="blog/arguing-effectively">How to Argue Effectively</a></li> diff --git a/publish b/publish @@ -95,7 +95,8 @@ fi # Update the relevant category page if [ $publishBlog ]; then - sed -i "/<ul>/a \ \ \ \ \<li\>$miniDate \<a href=\"$basePage\/$filename\"\>$pageTitle\<\/a\>\<\/li\>" pages/$basePage.md + awk -v pt="$pageTitle" -v bp="$basePage" -v f="$filename" -v d="$miniDate" \ + '{print} /^<ul>/ && !n {print " <li>"d" <a href=\""bp"/"f"\">"pt"</a></li>"; n++}' pages/$basePage.md elif [ $publishProject ]; then while true; do read -p "Is this a web-utility? " yn