爱意满满的作品展示区。
sox

docute 2.9.0 可以直接运行 markdown 里的代码

  •  
  •   sox ·
    egoist · Mar 10, 2017 · 3255 views
    This topic created in 3530 days ago, the information mentioned may be changed or developed.

    前情提要: docute v2.6.2

    做了个 docute-iframe 插件可以让你的代码块高亮的同时用 iframe 来运行这个代码块。

    需要运行的代码块用 4 个反引号包裹:

    ````html
    <script>
        document.write('hello world')
    </script>
    ````
    

    Repo: https://github.com/egoist/docute

    6 replies  •  2017-03-22 23:41:06 +08:00
    blanu
    blanu
    Mar 10, 2017 via iPhone
    1
    Great !之前我用 stackedit.io 魔改了可以运行 vue 代码的,现在这个应该更方便
    hronro
    hronro
    Mar 11, 2017
    2
    屌
    yangxuan8282
    yangxuan8282
    Mar 22, 2017
    3
    更新的好快啊,到 3.0 了,问下作者大大以后会压缩 js 大小吗,现在 200k + 第一次加载起来有点慢
    sox
    sox
    OP
    Mar 22, 2017
    4
    @yangxuan8282 vue + vuex + vue-router 就 120KB 了,是在不好弄小了 😂 你可以放在 CDN 上, 国内 unpkg.com 应该比较慢
    sox
    sox
    OP
    Mar 22, 2017
    5
    @yangxuan8282 其实 3.0 没有太大的变化,只是有个细微的插件改动是 breaking change
    yangxuan8282
    yangxuan8282
    Mar 22, 2017
    6
    @sox 今天发现之前用 docute 2.5 版本建立的一个页面不显示了了,看了下 github 发现好像得改 config.js ,暂时还没改,先用以前的 js
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1523 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 07:05 · PVG 15:05 · LAX 23:05 · JFK 02:05
    ♥ Do have faith in what you're doing.