The public directory contains the compiled static HTML.
Perhaps with some elaborate shell script you would be able to extract the several content pages and output them as separate Markdown files.
In any case we do not provide support for shell scripting in this forum. You would be better served by having a look at other forums like StackOverflow and the Ubuntu Forums.
By the way one of the very first things I learnt when I started working with UNIX is to be extra careful with the recursive delete
rm -rf command.
That is why you need to store your project in Git version control to avoid catastrophes like the one you just had.
Anyway, I really hope that you manage to sort this out.
There is a PHP library that converts HTML to Markdown. Never used it myself but have a look just in case it helps: