Code Monkey home page Code Monkey logo

Comments (7)

MikeRalphson avatar MikeRalphson commented on May 30, 2024

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 tab- plus the language code you want it to link to. I'm not sure how nice the formatting of GitHub code is going to show up, but the principle works.

from shins.

MikeRalphson avatar MikeRalphson commented on May 30, 2024

See also slatedocs/slate#776

from shins.

pkvenu avatar pkvenu commented on May 30, 2024

@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,

from shins.

MikeRalphson avatar MikeRalphson commented on May 30, 2024

I'm away from my computer at the moment, but you can put the snippet above directly in your .md file.

from shins.

pkvenu avatar pkvenu commented on May 30, 2024

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.

<pre class="tab-shell">
<script src="https://gist.github.com/MikeRalphson/0c42c2778ea7a7a6fc0b5d59b4d7868e.js"></script>
</pre>

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.

<pre class="tab-shell">
<script src="https://gist.githubusercontent.com/pkvenu/fe8c25b453f4c28c61d9/raw/9f2122f6edc2d724e5489cd27d36ee2e7a56a476/install.sh"></script>
</pre>

from shins.

MikeRalphson avatar MikeRalphson commented on May 30, 2024

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:

```js
!INCLUDEURL https://gist.githubusercontent.com/pkvenu/fe8c25b453f4c28c61d9/raw/9f2122f6edc2d724e5489cd27d36ee2e7a56a476/install.sh
``` 

from shins.

MikeRalphson avatar MikeRalphson commented on May 30, 2024

Closing due to inactivity, but please feel free to re-open.

from shins.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.