Skip to content

Show Gist In Markdown  #982

Description

@haozibi

Bug Report

hello,I have a problem. I write gist embed link in markdown,but docsify don't show it.

I want to know how to show gist in docsify

Steps to reproduce

  • index.html
<!DOCTYPE html><htmllang="en"><head><metacharset="UTF-8"><linkrel="icon" href="_media/favicon.ico"><metahttp-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /><metaname="description" content="Description"><metaname="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"><linkrel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css"><!-- mermaid --><linkrel="stylesheet" href="//cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.css"><scriptsrc="//cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script></head><body><divid="app"></div><script>mermaid.initialize({startOnLoad: false});window.$docsify={repo: 'haozibi/',auto2top: true,subMaxLevel: 2,executeScript: true,loadSidebar: true,loadNavbar: true,search: 'auto',markdown: {renderer: {code: function(code,lang){if(lang==="mermaid"){return('<div class="mermaid">'+mermaid.render(lang,code)+"</div>");}returnthis.origin.code.apply(this,arguments);}}},}</script><scriptsrc="//unpkg.com/docsify/lib/docsify.min.js"></script><scriptsrc="//unpkg.com/docsify/lib/plugins/external-script.js"></script><scriptsrc="//unpkg.com/docsify/lib/plugins/search.js"></script><scriptsrc="//unpkg.com/docsify/lib/plugins/emoji.js"></script><scriptsrc="//unpkg.com/docsify/lib/plugins/zoom-image.js"></script><scriptsrc="//unpkg.com/docsify-copy-code"></script><scriptsrc="//unpkg.com/prismjs/components/prism-go.js"></script><scriptsrc="//unpkg.com/prismjs/components/prism-bash.js"></script><scriptsrc="//unpkg.com/prismjs/components/prism-python.js"></script><scriptsrc="//unpkg.com/prismjs/components/prism-markdown.js"></script></body></html>
  • markdown
# test
<scriptsrc="https://gist.github.com/asukakenji/f15ba7e588ac42795f421b48b8aede63.js"></script>

What is current behaviour

Chrome console show

Failed to execute 'write' on 'Document': It isn't possible to write into a document from an asynchronously-loaded external script unless it is explicitly opened.

I am not very good at the FrontEnd, so I am confused about the problem. sorry~~

What is the expected behaviour

Other relevant information

  • Bug does still occur when all/other plugins are disabled?

  • Your OS: Mac OS 10.13.6

  • Node.js version:

  • npm/yarn version:

  • Browser version: 79.0.3945.79(64 Bit)

  • Docsify version:

  • Docsify plugins:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsrelated to the documentation of docsify itselfpr welcome

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions