Search This Blog

Message template in Blogger


posted on Monday, April 16, 2012

If you're in IT and keep a blog you do two things: write blog posts and think about how to automate that process :) 

The thing that annoys me most is that I (almost) always do two things the same in each post: use code snippets and end with some (probably already annoying) reference to how useful this is supposed to be :). So I always have to look up the code snippet from the post about adding syntax highlighted code snippets in blogger (
http://www.thiscouldbeuseful.com/2012/03/adding-syntax-highlighted-code-to-your.html) and copy it. So, I figure, can't I make a template that already has the <pre>-tags in it and my closing reference? Blogger wouldn't be a Google product if it couldn't, so here's how:


1.      Go to the Blogger home of your blog.

2.      Find the Settings options and choose the settings for Posts and comments and find "Post template".
3.      In this textbox you can add the text or html that you want to appear by default when you create a new post. In my case it's the following: 

text
<br/><br/>
<pre class="brush: csharp">
Put code here
</pre>
<br/>
text
<br/><br/><br/>
Could be useful, right?
<br/><br/><br/>

4.    Save it and that's it!


Could be useful, right?


1 comment: