Embeding Bitbucket Code Into a Website

So this post is to answer a question from my friend OJ about embedding code from bitbucket into a website.

I'm going to be taking for granted that you already have a bitbucket account, as well as content uploaded into it.

So let's start by looking at the screen shot below. Once your already logged into bitbucket, and looking at the source tab.

So travel down through the directories until you get to the file that has the code you wanna post online. Click on the file you want uploaded and within the file link you'll see this section:

And click the "embed" button on the right hand side.

In the place where the "embed" button was, will be the html code, just click the "copy" button and that html code will be in your buffer. Paste that code into your html code, and BAM you'll see the file of code all nicely highlighted with number lines and able to be shared with everyone.


Thanks for that mate. Awesome stuff.

If you made it this far down into the article, hopefully you liked it enough to share it with your friends. Thanks if you do, I appreciate it.

Bookmark and Share