zk: Add a horizontal ruler before the modeline

When using the zettel as a commit message this is also convenient as git
will ignore everything behind it. (Which also means that all horizontal
rulers in a zettel should use atleast 4 dashes)
This commit is contained in:
2022-04-12 17:18:00 +02:00
parent 7eb4a29b4d
commit e13ab8e855

View File

@@ -24,10 +24,13 @@ dir="$(date +"%Y/%m/%d/%H%M%S")"
mkdir -p "$dir"
if [[ ! -e "$dir/README.md" ]]; then
# Paste zettel template
# Paste zettel template, including header prefix, end-of-payload divider and
# vim-modeline
cat >"$dir/README.md" <<-EOF
#
---
<!--- vim: set ft=markdown.zettel: -->
EOF
else