2023-06-12 23:12:02 +00:00
|
|
|
#!./page.sh
|
|
|
|
|
|
|
|
cat << EOF
|
|
|
|
<div class="grid">
|
|
|
|
<div class="about">
|
|
|
|
|
|
|
|
<p>Hi, I'm david and this is my website.</p>
|
|
|
|
|
|
|
|
<p>if you want to contact me, you can message me on matrix <code>@ix:davidovski.xyz</code>.</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="image">
|
|
|
|
<img src="/images/remotecontrol.gif">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
cat << EOF
|
|
|
|
<div>
|
|
|
|
<h2>blog posts</h2>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
EOF
|
|
|
|
# list all the files in the directory
|
2023-07-25 18:19:09 +00:00
|
|
|
for file in $(ls -t entries/*.html); do
|
2023-06-12 23:12:02 +00:00
|
|
|
title="$(grep '^# ' $file)"
|
|
|
|
title=${title#\# }
|
|
|
|
|
|
|
|
printf "
|
|
|
|
<li class=\"entry\">
|
|
|
|
<a href=\"%s\">
|
|
|
|
<span>%s</span>
|
2023-07-25 18:22:41 +00:00
|
|
|
<div class=\"small\">%s</div>
|
2023-06-12 23:12:02 +00:00
|
|
|
</a>
|
|
|
|
</li>
|
2023-07-25 18:23:30 +00:00
|
|
|
" "${file%.*}.html" "$title" "$(git log --pretty=format:'%cd' --follow -- "$file" | tail -n 1)"
|
2023-06-12 23:12:02 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
cat << EOF
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
EOF
|