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

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.
Use https://carbon.now.sh/ for creating beautiful code snippets and download the pic and use it wherever you want
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With