Showing posts with label Blogging Tips. Show all posts
Showing posts with label Blogging Tips. Show all posts

07 September 2020

Making blogger a little less painful


Table of Contents

Recently google made an update to blogger for formatting code and inserting anchors in the Compose View itself(instead of HTML view). Yeah, it was just about the time when they came out with this fine separation between "blogger" and "legacy blogger".

The new changes they had incorporated was very good, focused as it was on simplicity . I actually used it to create one blog post which required the use of Table of Contents right from the "Compose View". I also used it to insert my Python code right from the "Compose View". Imagine the savings in time for somebody who makes a blog post daily ?

Suddenly a few days later all of it vanished as mysteriously as they appeared. Another Google+ ??? (oh yeah, that much touted alternative to Facebook)

Google seems to have done a veto on their recent updates to blogger. But yet I prefer google over some other blogging options like Medium becos in the near future google corporation don't need to worry about monetizing blogger , unlike the corporation run by Evan William's. ( He is the same guy who started blogger too , which was latter purchased by Google ).

So I began to think - How can I make blogging more easy on blogger instead of switching to another platform. Maybe google might bring those feature back, or maybe they wont. We don't know. So lets see what we can do for now.

I would like to cover the following issues which are of concern to me:

Formatting Source Code:

I have already dealt with formatting code in one of my previous posts. Check out one of my earlier post - Syntax Highlighter for Source Code on Blogs . This deals with code-prettify and unfortunately for us this is archived and is no longer maintained. So sooner than latter, we will have to look at alternatives.

The one I found most helpful was the use of gist. I have been using GitHub for a couple of years now and so it was the logical to continue with it.

14 July 2017

Syntax Highlighter for Source Code on Blogs - Google's code-prettify

 A few months back, I started sharing my open source codes on my blog and was looking around to find the best means to highlight the code samples.  Sometimes it helps to have code on the blog for a more detailed  step by step  explanation rather than just post a link to the whole code on a github repo.
There are many tools out there which are suited for the task. I finally zeroed in on Google's code-prettify becos of the simplicity of the solution that it offers. 

As the documentation says, code-prettify is "An embeddable javascript that makes source-code snippets in HTML prettier."


This is the way to setup your blogger for using code-pretiffy :
Step 1:   Login to your blogger account , click on Theme -> Edit HTML