Create beautiful code snippets for your website!

languageHi, today I'm going to show you how to create beautiful code snippets for your website in less than 5 min using our code_example open source project!

Why creating code snippets?

Code snippets are useful if you want to create a snippet with syntax highlighting on your website, documentation, or blog.

What you will have after this tutorial

Once you finished the tutorial, you will get the following beautiful code snippet, with syntax highlighting, in any languages supported by higlightjs

console.log("welcome on my code example!")

How to make my own code snippet?

To make your own code snippet, you will first need to include the following files in your HTML file:

Once you have included all the files, you can start creating your beautiful code snippets using the code_exmaple HTML tag. You can simply add your code in your snippet body inside the code_example HTML tag.

Here is an example of how it works:

console.log("Here is my code snippet content!");

That's it! You created your own beautiful code snippet, congrats 😎

You can find the source code of this project on our GitHub organization