summaryrefslogtreecommitdiff
path: root/compile-md.sh
diff options
context:
space:
mode:
authorBill <bill@billserver.senders.io>2022-11-05 21:00:40 -0400
committerBill <bill@billserver.senders.io>2022-11-05 21:00:40 -0400
commit3c055d4d579a0b78a9a9ebc622cec32037e958ac (patch)
tree87f9c9bc17e82590496c04f6fbfbb5afa4813f5f /compile-md.sh
parentda1be79522f7950bbe449f7c23c0f158a68bbdf4 (diff)
Add external props to compiled MD files
Comes with some minor changes to the wishlist page
Diffstat (limited to 'compile-md.sh')
-rwxr-xr-xcompile-md.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/compile-md.sh b/compile-md.sh
index c02e692..547408b 100755
--- a/compile-md.sh
+++ b/compile-md.sh
@@ -35,4 +35,7 @@ else
cat templates/page-footer.html >> $out
fi
+# update <a> tags that are external vs internal - assumes all internal links us relative routes
+sed -E -i "s/(<a)(.+href=\"http.+\".+>)/\1 rel=\"external noopener noreferrer\" target=\"_blank\" \2/g" $out
+
./tidy.sh $out