So after I posted my tribute to my deceased dad here on Blogger, I wondered if I could use Blogger to post code. After a number of false starts, I have chosen the easiest way for me to do so. Here's a step by step for you.
- Type out your text. Insert markers where your code should go. Markers should be a separate paragraph with easily findable text, like:
[SNIPPET #1 GOES HERE] - Create a new gist for each post. Create a new file in the gist for each snippet.
- Copy the embed link from the gist.
- Switch to "HTML view" in Blogger.
- Locate each snippet marker and remove just the tags around it. I usually start at the marker and work left until I find an end tag. Then I know that the tag to the right of the end tag is the start of my snippet. The tags may be spans and font settings.
- Once you have removed all the tags, replace the snippet marker with the embed link. Add "?file=somefilename" to the embed link to limit to one file in the gist.
- Switch back to "Compose view."
- Preview. You won't see anything in Compose view.
- Voila!
Here is the whole gist:
Here is just one file in the gist:
As a reference, the first file in the first snip above (post.html) contains the entire HTML for this post as it was BEFORE I added this line and everything below it.

1 comment:
Rad! So glad to have helped in a tiny way. Be excellent
Post a Comment