Test-Blog: A blog template for Github Pages

Test-Blog: A blog template for Github Pages

ยท

1 min read

I have procrastinated this idea for some time.

The idea is to use GitHub's API to facilitate a blog. You fork the repo, and the start creating markdown, simple text, xml, svg or html files under static/md (or any location of your choice). These are fetched and rendered as files and folders.

Clicking on files renders their content, clicking on folders opens the contents of that folder. The routing is done via hashes, so history back or next button is clicked, an hashchange event is triggered without page load.

You control how each individual item appears using meta.json placed inside each folder (like the good old .htaccess from LAMP stack!) and it is completely optional. You can control how the contents will be rendered. Default rendering mode assumes the contents are mardown. But by setting mode to xml or src you can render svgs, html or execute scripts dynamically.

Overall I am quiete happy how it turned out, check it out:

You can see it in action here:
https://ibrahimtanyalcin.github.io/test-blog/

And here is the repo:
https://github.com/IbrahimTanyalcin/test-blog

๐Ÿ‘‹โ€œ๐Ÿ‘‹

ย