Hi there, just digging the archives and trying to understand the platform.
If I were to do this in WordPress, I would create a shortcode and the user would add the following when writing a post: [gist id="GIST_ID"]
.
Then I would process and render that on the HTML as
<script src="https://gist.github.com/username/GIST_ID.js"></script>
I understand that Sitecake editor is only for content, but how advanced can one get client-side or server-side? Any example on how to encapsulate things with PHP?
Or let’s say an H1 element text content started with gist-
+ GIST_ID
, I guess I could detect that and serve the embed (?)
I found some interesting JS solutions:
- gist-embed: Ultra powered gist embedding for your website - Github
- JS - How can I embed an entire GitHub Gist dynamically on a page? - Stack Overflow
- jQ - Dynamically load a Gist embed? - Stack Overflow - question ID: 9154026