May 27, 2015 asvignesh 0Comment

When I write blogs which explains something using code snippet, i used to add the code directly and blockquote it later i find some plugins which will render the code in the readable format with syntax highlighting, later i used to add code snippet in GIST and embed in post using some plugins, recently i got a chance to read this post 

Which lets you to embed the GIST code in your blog post without any additional plugins with simple steps

  1. Login to WP_admin
  2. In WordPress admin console
  3. Goto Appearance > Editor > Select the current theme and click on functions.php
  4. Paste the below code snippet to your WordPress theme function.php file

and simply add your gist url without the username

Say, if this is my URL

add to post as which will automatically embed as code snippet

if you want to embed particular file, use file query string 

Software developer experience in building storage management and Data protection software for the Private and public cloud.

Disclaimer :

This is a personal weblog. The opinions expressed here represent my own and not those of my employer. my thoughts and opinions change from time to time… This weblog is intended to provide a semi-permanent point in time snapshot and manifestation of the various memes running around my brain, and as such any thoughts and opinions expressed within out-of-date posts may not the same, nor even similar, to those I may hold today.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.