The reason why there are so many static site generators is that they are trivial to write (which is why making your own is a good beginner coding project):
for {post}.md in in blogdir:
if timestamp({post}.html) < timestamp({post}.md):
convert_md_2_html({post}.md)