LazyBlogger: Static javascript blog template


When I want to create my own blog on github, I was very appalled to figure out that github only host static webpages - with the exception of jekyll.
As a windows user, I am too lazy to install ruby, jekyll server and whatnot.
I find static blog frameworks out there are too troublesome for my needs.
I only want to have a static template where I can modify my navbars, and a content area where I can freely populate with my posts.

Well, it was more complicated than expected, but here it is, a javascript rendered blog framework.

Usage Requirements:
- lazyblogger.js
- lazyblogger_layout.js
- content/ directory in your root directory (containing any directory and .html)
- layout.html
- Include this code in layout.html after loading jQuery

 <!-- lazyBlogger -->
 <script src="./js/lazyblogger_layout.js"></script>
 <\script>
  $( document ).ready(function(){
   lazyblogger_init($("#content"));
  });
 </script>


Include this code in all content .html files (careful on lazyblogger.js location as you may want to nest content folder):

<body style="display: none;"><div id="content">
 <!-- your content here -->
</div><script src="../js/lazyblogger.js"></script></body>


Unfortunately, due to certain ActiveX restrictions, debugging LazyBlogger locally requires Mozzila Firefor.
But fret not, once it gets pushed to github it will work on chrome and ie as well.
Get it here and check out the demo.

Update 2025-04-26:
Browser security has improved, and file:// is now subject to CORS.
Read: opening Lazyblogger locally will now load a blank page due to CORS policy.

The workaround is to run the page in python, so you can access it via localhost.
Navigate to the parent directory of your index.html, and run

python -m http.server 8000


And now your site should be accessible on http://localhost:8000!