Embeding Git/Gists on devdojo

Solved
mcsee

Mar 1st, 2021 08:19 AM

How do we embed Git code snippets ?

so far I have only seen code directly embeded on articles and strict markdown does not support it

bobbyiliev

Mar 1st, 2021 08:32 AM

Hi there 👋,

As of the time being this is not supported, but I really like the idea so I will add this to our backlog and will start working on this soon.

In the meantime, you could use CodePen to share code snippets or as you mentioned you could embed the code directly in the article.

Regards, Bobby

bobbyiliev

Mar 9th, 2021 01:19 AM

Best Answer

Hi there!

This is now available, you can use this liquid tag:

mcsee

Mar 20th, 2021 10:14 AM

amazing !!

will jump to use it !

bobbyiliev

Mar 20th, 2021 11:48 AM

Sounds great! Good luck with your posts!

mcsee

Mar 21st, 2021 05:22 AM

I've tried this three different ways, and they don't seem to be working (at least in preview mode)

Nevertheless they DO work here. so it might just be an error on preview mode.

bobbyiliev

Mar 21st, 2021 08:11 AM

Hi there 👋

Ah yes, there is a bug in the preview functionality indeed. I’ll look into this.

For the time being hat you could do is save the post as draft and view the post directly via the draft url.

Thanks for pointing that out!