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

2

12

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.

Zucchetto answered 3/4, 2019 at 1:38 Comment(1)
It's pretty sad they still haven't gotten it right, in 2024.Boult
B
26

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

Beitz answered 11/3, 2021 at 5:55 Comment(1)
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes.Jazminejazz
S
5

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.

Subjunction answered 27/11, 2019 at 23:33 Comment(1)
Thanks @FrancoSF! Unfortunately, tools like Linkedin and Medium don't have good support for that... I'm getting by like you: generating images and putting them along the text.Register

© 2022 - 2024 — McMap. All rights reserved.