-
-
Notifications
You must be signed in to change notification settings - Fork 320
Feature: load code snippets from Github for sample codes #6
Comments
Hi @pkvenu You can put anything into the right hand code snippets column by adding a section like: <pre class="tab-shell">
<script src="https://gist.github.com/MikeRalphson/0c42c2778ea7a7a6fc0b5d59b4d7868e.js"></script>
</pre> Where the class should be |
See also slatedocs/slate#776 |
@MikeRalphson - Can you tell me which file I would need to edit to add the section mentioned above. I tried looking at layouts/layout.ejs and javascript/app/_lang.js but not sure if that would be the right files to update. If you have some samples it would be really helpful. Thanks, |
I'm away from my computer at the moment, but you can put the snippet above directly in your .md file. |
I tried using the gist snippet and it shows the content but the layout is messed up and when we change tabs the content does not change.
Ideally, What I would like to use is raw data from Gist/Github. When I try with a Gist raw data url the content is empty.
|
I think what you need is some kind of markdown pre-processor. I rewrote markdown-pp from Python to Node.js as markdown-pp-js. It has a function to include from URLs, so you should be able to do:
|
Closing due to inactivity, but please feel free to re-open. |
In language tabs, I would like to load code snippets for each tab from Github rather than hard-coding it in markdown file. In markdown file, I would specify the Github Url for each language. This would help me save duplication content and single file as source of truth.
Is it something currently doable using Shins.
The text was updated successfully, but these errors were encountered: