简体   繁体   English

如何在我的Codepen(Javascript)中使用来自Github要点的代码?

[英]How can I use code from a Github gist in my Codepen (Javascript)?

I've got a gist that has the following code: 的要点具有以下代码:

var hello = "Hello World!" 

I'd like to be able to use it in my Codepen project's Javascript, but I'm not sure how. 我希望能够在Codepen项目的Javascript中使用它,但是我不确定如何使用它。 I tried using Github's embed feature, but that just displays a link to the gist and nothing more. 我尝试使用Github的embed功能,但这仅显示了要点的链接,仅此而已。

Here's the link to my Codepen: 这是我的Codepen的链接:

http://codepen.io/Random_Pseudonym/pen/EWvdge

The protocol in the gist that you've shown uses 您显示的要点中的协议使用
https//gist.github.com/Rusty25/3f08edf4e64d3373511df9a8a4ef45f4.js

Should it not be https://gist.github.com/Rusty25/3f08edf4e64d3373511df9a8a4ef45f4.js ? 应该不是https://gist.github.com/Rusty25/3f08edf4e64d3373511df9a8a4ef45f4.js吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM