working version of blog.php with newly added automatic parsing of json files