Showing posts with label blogger. Show all posts
Showing posts with label blogger. Show all posts

Sunday, May 28, 2017

how to treat "<" ">" "&" on blogger post?

1. to write "<" ">" "&"

when you want to write "<" ">" "&" on blogger post html editor. Use FREEFORMATTER.COM. get code and paste on your html.
< > &

2. to write "&lt; &gt; &amp;"

To write "&lt; &gt; &amp;", write like this.
&amp;lt; &amp;gt; &amp;amp;
How easy!

highlight code on blogger with code-pretty

Mainly, there are two ways to highlight codes on blogger which are syntaxhighlighter and code-prettify. I tried code-prettify and installation tips are below.

1. config template

open the http configuration page("theme" > "edit html")


put the script tag below just above "<head>".
<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script>

then push the save button.

2. write blog post

To write blog post, write like this. make sure you select "html" tab to edit post.
<pre class="prettyprint"><code class="language-python">
# code here
print ("hogehoge")
</code></pre>
shown like this.
# code here
print ("hogehoge")