Skip to main content

Add Code Snippet To Blog Post Using Github Gist

github

A Gist is a snippet of code hosted by Github. it has all the benefits of a Github repository, but provides them to you in a most easy way. Public Gists are free to create and store on Github. They are likewise super easy.
You can create a new Gist, add, modify, and delete files and code entirely in the browser. You don't need to install or download anything.

last time I wrote about how you can add code snippets to your blogger blog posts using syntaxhighlighter. Today, I will be exposing to you how github works for blogger and other blogging platforms when it comes to adding code snippets.

Below are the steps
  1. Sign up with github if you haven't, then Log in to site.
  2. Click the Gist link at the top of the screen or visit gist.github.com
  3. Fill out the file name
  4. Enter your supposed code
  5. Click Create Public Gist
Note: The syntax highlighting auto- detects based on the extension of the file name that you enter, so be sure you add the appropriate level of detail. Now that you have created your gist, you need to embed it.

github

Once you create your Gist, you will land on a page which displays your code.
Copy the embed link and paste the script tag on to your website.

and that's all.
make sure your paste the script tag in the html view of your post editor...
To edit any code you've written, go to your github gists and edit.

Comments

Popular posts from this blog

Earn While you Save With Alat.ng

If you've always wanted to save up for the future, but didn't take actions for reasons best known to you, now is the time to reconsider your thoughts and take actions, because there is a digital bank known as ALAT waiting to be utilized. What Is A Digital Bank? According to Avoka.com; "Digital banking is the digitization (or moving online) of all the traditional banking activities and programs that historically were only available to customers when physically inside of a bank branch." What is ALAT? ALAT is a digital bank, the first if its kind in Nigeria! It is an innovation of Wema Bank Nigeria, developed to give you easy access to saving your funds and doing other bank transactions without being physically present at the bank.  With Alat digital bank, you can open a savings account using your phone number and Bank Verification Number (BVN) as well as other documents that you will be prompted to upload during the registration process. It’s simple, convenient, reliabl...

#Day2: Overcoming Procrastination

Have you ever tried getting rid of procrastination but find yourself procrastinating about doing what's needed to be done? # Day2 of my 30 days on a Confused State of Mind. Today, it's about overcoming my biggest struggle, Procrastination. In case you missed #DAY1 Of my Confused State of mind, You can go read it >>>>  Discovering my self-worth 99% of times, I find myself procrastinating but worrying over the fact that I can't fight it! Like whom ever said I couldn't fight it? It's a rough fight and I'm always at the losing end. I feel bad about the fact that I go through this but I'm not ashamed to admit it. Probably spiting it out is one of the ways I've got to fight it. Who Else Rows the Boat? The act of postponing and procrastinating isn't peculiar to me, definitely there are a lot more people out there struggling even worse than I. But it doesn't matter, because we are all birds of a feather!  Obviously, it feels so bad to b...

30 Days On A Confused State of Mind: #DAY1: Discovering My Self Worth

#Day1 Hello dear and welcome to the first day of my confused state of mind mindboggling findings. This is not just a step discovery challenge but its also more like a 30 days blogging challenge for me, as well as a plot to overcoming some procrastination ish. I only hope I don't get tired too soon! It's only the first day and I already feel worse than Garfield! Telegraph.co.uk Now, lets head over to the First Topic of my 30 days challenge. It absolutely wasn't thought through but there was no need to think it through because it came in like a flash and “Discovering My Self Worth”, was the first issue I could Point out of my may overwhelmed thoughts! On Discovering My Self Worth There are too many unanswered questions, Ones that have weighed me down over the years and others with answers I've refused to hold on to (I rather not be told the truth). If you've had issues with loving yourself, then the word self-worth shouldn't be so stran...