最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Can speaker deck slide be embedded in README file of github? - Stack Overflow

programmeradmin5浏览0评论

I have a presentation slide in speakerdeck and i want to embed it in README.md page of github repository. is it possible to do so?

Here is my embedded script from speakerdeck

<script async class="speakerdeck-embed" data-id="3586d5e7f45ce6" data-ratio="1.33333333333333" src="//speakerdeck/assets/embed.js"></script>

README.md

###Introduction

This is a introduction of the app ...

###Slide

<script async class="speakerdeck-embed" data-id="3586d6f45ce6" data-ratio="1.33333333333333" src="//speakerdeck/assets/embed.js"></script>

slide does not appear on README section of repo.

I have a presentation slide in speakerdeck and i want to embed it in README.md page of github repository. is it possible to do so?

Here is my embedded script from speakerdeck

<script async class="speakerdeck-embed" data-id="3586d5e7f45ce6" data-ratio="1.33333333333333" src="//speakerdeck./assets/embed.js"></script>

README.md

###Introduction

This is a introduction of the app ...

###Slide

<script async class="speakerdeck-embed" data-id="3586d6f45ce6" data-ratio="1.33333333333333" src="//speakerdeck./assets/embed.js"></script>

slide does not appear on README section of repo.

Share edited Jan 4, 2016 at 1:17 Guildencrantz 1,9151 gold badge16 silver badges33 bronze badges asked Jan 3, 2016 at 14:43 achyutdevachyutdev 2253 silver badges10 bronze badges
Add a ment  | 

4 Answers 4

Reset to default 5

No, you can't and you shouldn't mostly because of security reasons.

GitHub won't allow the execution of an external script.

Check this answer: Embed JavaScript in GitHub README.md

No, you cannot embed scripts inside GitHub's markdown.

Being able to embed scripts would lead to XSS (Cross-site scripting) insecurities, therefore it is not possible by GitHub's design, and for good reason.

There is no way to add scripts to markdown.
Mark down can be only used for text formatting and not more.

Here is what allowed to use:


What can you still do?

You can still embed images like you see here on this answer. So convert your slides to images and embed them

Everything said above is true but I wanted to add one additional piece of information.

Even though README will not display the embedded slide but if this repo is converted into Github Page then the same README will be rendered perfectly and it will display the speakerdeck slide as well.

发布评论

评论列表(0)

  1. 暂无评论