Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I embed a snippet code at my Linkedin article?

I want to embed a snippet code at my LinkedIn article, like that:

enter image description here

That image is from Gitlab snippets (https://gitlab.com/snippets/1841785). Is there some way to render its content in the LinkedIn articles? I saw that post at my LinkedIn feed and I got curious how to do this.

I noticed that Gitlab provides two way to get the snippet: a embed or share content. How should I use?

Thank you.

like image 808
Rogério Oliveira Avatar asked Jan 20 '26 22:01

Rogério Oliveira


2 Answers

Use https://carbon.now.sh/ for creating beautiful code snippets and download the pic and use it wherever you want

like image 173
Saurav Shukla Avatar answered Jan 23 '26 21:01

Saurav Shukla


LinkedIn rendering for code snippet is very basic (white text on a black background, no keywords or strings highlight). My favorite way to share short snippet of code on LinkedIn is by creating an image (like the one you included here) and link the image to the original code on GitHub.

like image 26
FrancoSF Avatar answered Jan 23 '26 20:01

FrancoSF