davidovski/site/index.html

44 lines
740 B
HTML
Executable File

#!./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
for file in $(ls -t entries/*.html); do
title="$(grep '^# ' $file)"
title=${title#\# }
printf "
<li class=\"entry\">
<a href=\"%s\">
<div class=\"small\">%s</div>
<span>%s</span>
</a>
</li>
" "${file%.*}.html" "$(git log --pretty=format:'%cd' "$file" | tail -n 1)" "$title"
done
cat << EOF
</ul>
</div>
EOF