and HTML and Markdown and README and Website and Demo

We all love READMEs. Well-written README shows you

README is the central part of software project presentation. There might be websites and manuals for some. But for most, README is The Home.

So I wondered, can one use HTML for README and have some fun logic there? It turns out, one can do that! Thanks to matrss comment in Forgejo issues, I now know that one can symlink READMEs to get a chimera that’s both a website and a README. You’re looking at one right now!

This is not only a website and README, it’s also a demo. This paragraph you’re (probably painfully) reading right now is being slowly rearranged. By JS script embedded in the README. This script is simply ignored / sanitized away by Codeberg (or any Git forge really) and thus not visible in README. But it works in the website view, and that enables the website to diverge from README significantly! So, if you want to have a fancy dynamic website but don’t really want to mess with a separate project. README website can help you!

Now let’s actually talk about how it work. Because I’m sure the implementation will make some of you weep and some of you shut your laptop lid in disgust.

It’s… README.html. Yes, I’m writing my READMEs in HTML. More reliable and portable this way. Well, you’re looking at a byproduct of this portability right now.

So the full workflow is: