Gists-Talk

Summary: Talk page for Gists.
Maintainer: MichaelPaulukonis
Users: (View? / Edit)

This space is for User-contributed commentary and notes. Please include your name and a date along with your comment.

This recipe is outdated, as it uses the deprecated /e modifier, which causes errors on modern versions of PHP... this can be fixed, but more importantly: there's a much easier way to embed gists!

Add this to your config.php:

Markup('gist-embed', 'directives', '/\\(:gist-embed\\s+(.+)\\s*:\\)/', function ($m) { 
	return Keep("<script src='https://gist.github.com/$m[1].js'></script>"); }
);

Then do: (:gist-embed your-github-username/unique-gist-id:) (for example: (:gist-embed achmizs/0c1b9a3a8c2d3c5e725624392e6da461:)).

That's it! (This method also doesn't rely on third-party code, etc.)

Said Achmiz December 23, 2017, at 04:01 PM

UPDATE 2017-12-25: I’ve expanded the above code into a recipe, GistEmbed, which has all the features of Gists (plus a couple more).

Said Achmiz December 25, 2017, at 06:24 PM

Talk page for the Gists recipe (users?).