Forem Creators and Builders


Add a way to embed github gists with highlighted lines

tusharsadhwani profile image Tushar Sadhwani ・1 min read

Github lets you highlight parts of your gist by the following syntax:, to highlight line 7 for example.

Real example:


Trying to embed a file with lines highlighted doesn't seem to work with forem, both with and without the file=filename syntax.

It would be nice if a lines=... attribute could be added to the gist liquid tag, for example:

{% gist file=untrusted-lvl5-solution-js lines=L14-L16 %}

Discussion (1)

michaeltharrington profile image
Michael Tharrington

I could totally see this being very helpful!

Forem Open with the Forem app