Skip to content

Commit

Permalink
🎨 fix #1241
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed May 24, 2022
1 parent 999e268 commit 225f3f6
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 46 deletions.
16 changes: 8 additions & 8 deletions demo/comment.html
Expand Up @@ -16,11 +16,11 @@
content="Vditor 支持三种所见即所得(wysiwyg)、即时渲染(ir)、分屏预览(sv)模式,支持大纲、数学公式、脑图、图表、流程图、甘特图、时序图、五线谱、多媒体、语音阅读、标题锚点、代码高亮及复制、graphviz 渲染。"/>
<meta name="twitter:description" property="og:description" itemprop="description"
content="Vditor 支持三种所见即所得(wysiwyg)、即时渲染(ir)、分屏预览(sv)模式,支持大纲、数学公式、脑图、图表、流程图、甘特图、时序图、五线谱、多媒体、语音阅读、标题锚点、代码高亮及复制、graphviz 渲染。"/>
<link rel="dns-prefetch" href="//cdn.jsdelivr.net/"/>
<link rel="preconnect" href="https://cdn.jsdelivr.net">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/npm/vditor/src/assets/images/logo.png"/>
<link rel="apple-touch-icon" href="https://cdn.jsdelivr.net/npm/vditor/src/assets/images/logo.png">
<link rel="shortcut icon" type="image/x-icon" href="https://cdn.jsdelivr.net/npm/vditor/src/assets/images/logo.png">
<link rel="dns-prefetch" href="//unpkg.com/"/>
<link rel="preconnect" href="https://unpkg.com">
<link rel="icon" type="image/png" href="https://unpkg.com/vditor/dist/images/logo.png"/>
<link rel="apple-touch-icon" href="https://unpkg.com/vditor/dist/images/logo.png">
<link rel="shortcut icon" type="image/x-icon" href="https://unpkg.com/vditor/dist/images/logo.png">
<meta name="copyright" content="B3log"/>
<meta http-equiv="Window-target" content="_top"/>
<meta property="og:locale" content="zh-cmn-Hans"/>
Expand All @@ -34,8 +34,8 @@
content="Vditor: ♏ An In-browser Markdown editor, support WYSIWYG, Instant Rendering (Typora-like) and Split View modes. 一款浏览器端的 Markdown 编辑器,支持所见即所得、即时渲染(类似 Typora)和分屏预览模式。"/>
<meta name="twitter:site" content="@B3logOS"/>
<meta name="twitter:url" content="https://b3log.org/vditor"/>
<meta property="og:image" content="https://cdn.jsdelivr.net/npm/vditor/src/assets/images/logo.png"/>
<meta name="twitter:image" content="https://cdn.jsdelivr.net/npm/vditor/src/assets/images/logo.png"/>
<meta property="og:image" content="https://unpkg.com/vditor/dist/images/logo.png"/>
<meta name="twitter:image" content="https://unpkg.com/vditor/dist/images/logo.png"/>
<style>
body {
margin: 0;
Expand All @@ -58,7 +58,7 @@
position: absolute;
}
</style>
<script src="https://cdn.jsdelivr.net/npm/vconsole@3.3.4/dist/vconsole.min.js"></script>
<script src="https://unpkg.com/vconsole@3.3.4/dist/vconsole.min.js"></script>
</head>
<body>
<div class="vditor-reset nav">
Expand Down
16 changes: 8 additions & 8 deletions demo/index.html
Expand Up @@ -16,11 +16,11 @@
content="Vditor 支持三种所见即所得(wysiwyg)、即时渲染(ir)、分屏预览(sv)模式,支持大纲、数学公式、脑图、图表、流程图、甘特图、时序图、五线谱、多媒体、语音阅读、标题锚点、代码高亮及复制、graphviz 渲染。"/>
<meta name="twitter:description" property="og:description" itemprop="description"
content="Vditor 支持三种所见即所得(wysiwyg)、即时渲染(ir)、分屏预览(sv)模式,支持大纲、数学公式、脑图、图表、流程图、甘特图、时序图、五线谱、多媒体、语音阅读、标题锚点、代码高亮及复制、graphviz 渲染。"/>
<link rel="dns-prefetch" href="//cdn.jsdelivr.net/"/>
<link rel="preconnect" href="https://cdn.jsdelivr.net">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/npm/vditor/src/assets/images/logo.png"/>
<link rel="apple-touch-icon" href="https://cdn.jsdelivr.net/npm/vditor/src/assets/images/logo.png">
<link rel="shortcut icon" type="image/x-icon" href="https://cdn.jsdelivr.net/npm/vditor/src/assets/images/logo.png">
<link rel="dns-prefetch" href="//unpkg.com/"/>
<link rel="preconnect" href="https://unpkg.com">
<link rel="icon" type="image/png" href="https://unpkg.com/vditor/dist/images/logo.png"/>
<link rel="apple-touch-icon" href="https://unpkg.com/vditor/dist/images/logo.png">
<link rel="shortcut icon" type="image/x-icon" href="https://unpkg.com/vditor/dist/images/logo.png">
<meta name="copyright" content="B3log"/>
<meta http-equiv="Window-target" content="_top"/>
<meta property="og:locale" content="zh-cmn-Hans"/>
Expand All @@ -34,8 +34,8 @@
content="Vditor: ♏ An In-browser Markdown editor, support WYSIWYG, Instant Rendering (Typora-like) and Split View modes. 一款浏览器端的 Markdown 编辑器,支持所见即所得、即时渲染(类似 Typora)和分屏预览模式。"/>
<meta name="twitter:site" content="@B3logOS"/>
<meta name="twitter:url" content="https://b3log.org/vditor"/>
<meta property="og:image" content="https://cdn.jsdelivr.net/npm/vditor/src/assets/images/logo.png"/>
<meta name="twitter:image" content="https://cdn.jsdelivr.net/npm/vditor/src/assets/images/logo.png"/>
<meta property="og:image" content="https://unpkg.com/vditor/dist/images/logo.png"/>
<meta name="twitter:image" content="https://unpkg.com/vditor/dist/images/logo.png"/>
<style>
body {
margin: 0;
Expand All @@ -51,7 +51,7 @@
color: #4285f4;
}
</style>
<script src="https://cdn.jsdelivr.net/npm/vconsole@3.9.1/dist/vconsole.min.js"></script>
<script src="https://unpkg.com/vconsole@3.9.1/dist/vconsole.min.js"></script>
</head>
<body>
<div class="vditor-reset nav">
Expand Down
2 changes: 1 addition & 1 deletion demo/index.js
Expand Up @@ -83,7 +83,7 @@ const initVditor = (language) => {
type: 'text',
},
hint: {
emojiPath: 'https://cdn.jsdelivr.net/npm/vditor@1.8.3/dist/images/emoji',
emojiPath: 'https://unpkg.com/vditor@1.8.3/dist/images/emoji',
emojiTail: '<a href="https://ld246.com/settings/function" target="_blank">设置常用表情</a>',
emoji: {
'sd': '💔',
Expand Down
14 changes: 7 additions & 7 deletions demo/jest-puppeteer.html
Expand Up @@ -15,11 +15,11 @@
content="Vditor 支持三种所见即所得(wysiwyg)、即时渲染(ir)、分屏预览(sv)模式,支持大纲、数学公式、脑图、图表、流程图、甘特图、时序图、五线谱、多媒体、语音阅读、标题锚点、代码高亮及复制、graphviz 渲染。"/>
<meta name="twitter:description" property="og:description" itemprop="description"
content="Vditor 支持三种所见即所得(wysiwyg)、即时渲染(ir)、分屏预览(sv)模式,支持大纲、数学公式、脑图、图表、流程图、甘特图、时序图、五线谱、多媒体、语音阅读、标题锚点、代码高亮及复制、graphviz 渲染。"/>
<link rel="dns-prefetch" href="//cdn.jsdelivr.net/"/>
<link rel="preconnect" href="https://cdn.jsdelivr.net">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/npm/vditor/src/assets/images/logo.png"/>
<link rel="apple-touch-icon" href="https://cdn.jsdelivr.net/npm/vditor/src/assets/images/logo.png">
<link rel="shortcut icon" type="image/x-icon" href="https://cdn.jsdelivr.net/npm/vditor/src/assets/images/logo.png">
<link rel="dns-prefetch" href="//unpkg.com/"/>
<link rel="preconnect" href="https://unpkg.com">
<link rel="icon" type="image/png" href="https://unpkg.com/vditor/dist/images/logo.png"/>
<link rel="apple-touch-icon" href="https://unpkg.com/vditor/dist/images/logo.png">
<link rel="shortcut icon" type="image/x-icon" href="https://unpkg.com/vditor/dist/images/logo.png">
<meta name="copyright" content="B3log"/>
<meta http-equiv="Window-target" content="_top"/>
<meta property="og:locale" content="zh-cmn-Hans"/>
Expand All @@ -32,8 +32,8 @@
content="Vditor: ♏ An In-browser Markdown editor, support WYSIWYG, Instant Rendering (Typora-like) and Split View modes. 一款浏览器端的 Markdown 编辑器,支持所见即所得、即时渲染(类似 Typora)和分屏预览模式。"/>
<meta name="twitter:site" content="@B3logOS"/>
<meta name="twitter:url" content="https://b3log.org/vditor"/>
<meta property="og:image" content="https://cdn.jsdelivr.net/npm/vditor/src/assets/images/logo.png"/>
<meta name="twitter:image" content="https://cdn.jsdelivr.net/npm/vditor/src/assets/images/logo.png"/>
<meta property="og:image" content="https://unpkg.com/vditor/dist/images/logo.png"/>
<meta name="twitter:image" content="https://unpkg.com/vditor/dist/images/logo.png"/>
</head>
<body>
<h2>Vditor for jest puppeteer</h2>
Expand Down
2 changes: 1 addition & 1 deletion demo/jest-puppeteer.js
Expand Up @@ -27,7 +27,7 @@ window.vditorTest = new Vditor('vditorTest', {
},
},
hint: {
emojiPath: 'https://cdn.jsdelivr.net/npm/vditor/dist/images/emoji',
emojiPath: 'https://unpkg.com/vditor/dist/images/emoji',
emojiTail: '<a href="https://ld246.com/settings/function" target="_blank">设置常用表情</a>',
emoji: {
'+1': '👍',
Expand Down
14 changes: 7 additions & 7 deletions demo/render.html
Expand Up @@ -16,11 +16,11 @@
content="Vditor 支持三种所见即所得(wysiwyg)、即时渲染(ir)、分屏预览(sv)模式,支持大纲、数学公式、脑图、图表、流程图、甘特图、时序图、五线谱、多媒体、语音阅读、标题锚点、代码高亮及复制、graphviz 渲染。"/>
<meta name="twitter:description" property="og:description" itemprop="description"
content="Vditor 支持三种所见即所得(wysiwyg)、即时渲染(ir)、分屏预览(sv)模式,支持大纲、数学公式、脑图、图表、流程图、甘特图、时序图、五线谱、多媒体、语音阅读、标题锚点、代码高亮及复制、graphviz 渲染。"/>
<link rel="dns-prefetch" href="//cdn.jsdelivr.net/"/>
<link rel="preconnect" href="https://cdn.jsdelivr.net">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/npm/vditor/src/assets/images/logo.png"/>
<link rel="apple-touch-icon" href="https://cdn.jsdelivr.net/npm/vditor/src/assets/images/logo.png">
<link rel="shortcut icon" type="image/x-icon" href="https://cdn.jsdelivr.net/npm/vditor/src/assets/images/logo.png">
<link rel="dns-prefetch" href="//unpkg.com/"/>
<link rel="preconnect" href="https://unpkg.com">
<link rel="icon" type="image/png" href="https://unpkg.com/vditor/dist/images/logo.png"/>
<link rel="apple-touch-icon" href="https://unpkg.com/vditor/dist/images/logo.png">
<link rel="shortcut icon" type="image/x-icon" href="https://unpkg.com/vditor/dist/images/logo.png">
<meta name="copyright" content="B3log"/>
<meta http-equiv="Window-target" content="_top"/>
<meta property="og:locale" content="zh-cmn-Hans"/>
Expand All @@ -34,8 +34,8 @@
content="Vditor: ♏ An In-browser Markdown editor, support WYSIWYG, Instant Rendering (Typora-like) and Split View modes. 一款浏览器端的 Markdown 编辑器,支持所见即所得、即时渲染(类似 Typora)和分屏预览模式。"/>
<meta name="twitter:site" content="@B3logOS"/>
<meta name="twitter:url" content="https://b3log.org/vditor"/>
<meta property="og:image" content="https://cdn.jsdelivr.net/npm/vditor/src/assets/images/logo.png"/>
<meta name="twitter:image" content="https://cdn.jsdelivr.net/npm/vditor/src/assets/images/logo.png"/>
<meta property="og:image" content="https://unpkg.com/vditor/dist/images/logo.png"/>
<meta name="twitter:image" content="https://unpkg.com/vditor/dist/images/logo.png"/>
<style>
body {
margin: 0;
Expand Down
6 changes: 3 additions & 3 deletions demo/render.js
Expand Up @@ -40,7 +40,7 @@ const render = (fileName) => {
outlineElement.style.display = 'block'
}
},
lazyLoadImage: 'https://cdn.jsdelivr.net/npm/vditor/dist/images/img-loading.svg',
lazyLoadImage: 'https://unpkg.com/vditor/dist/images/img-loading.svg',
renderers: {
renderHeading: (node, entering) => {
const id = Lute.GetHeadingID(node)
Expand All @@ -64,13 +64,13 @@ window.setTheme = (theme) => {
if (theme === 'dark') {
Vditor.setCodeTheme('native')
Vditor.setContentTheme('dark',
'https://cdn.jsdelivr.net/npm/vditor/dist/css/content-theme')
'https://unpkg.com/vditor/dist/css/content-theme')
outlineElement.classList.add('dark')
document.querySelector('html').style.backgroundColor = '#2f363d'
} else {
Vditor.setCodeTheme('github')
Vditor.setContentTheme('light',
'https://cdn.jsdelivr.net/npm/vditor/dist/css/content-theme')
'https://unpkg.com/vditor/dist/css/content-theme')
outlineElement.classList.remove('dark')
document.querySelector('html').style.backgroundColor = '#fff'
}
Expand Down
18 changes: 9 additions & 9 deletions demo/static.html
Expand Up @@ -16,11 +16,11 @@
content="Vditor 支持三种所见即所得(wysiwyg)、即时渲染(ir)、分屏预览(sv)模式,支持大纲、数学公式、脑图、图表、流程图、甘特图、时序图、五线谱、多媒体、语音阅读、标题锚点、代码高亮及复制、graphviz 渲染。"/>
<meta name="twitter:description" property="og:description" itemprop="description"
content="Vditor 支持三种所见即所得(wysiwyg)、即时渲染(ir)、分屏预览(sv)模式,支持大纲、数学公式、脑图、图表、流程图、甘特图、时序图、五线谱、多媒体、语音阅读、标题锚点、代码高亮及复制、graphviz 渲染。"/>
<link rel="dns-prefetch" href="//cdn.jsdelivr.net/"/>
<link rel="preconnect" href="https://cdn.jsdelivr.net">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/npm/vditor/src/assets/images/logo.png"/>
<link rel="apple-touch-icon" href="https://cdn.jsdelivr.net/npm/vditor/src/assets/images/logo.png">
<link rel="shortcut icon" type="image/x-icon" href="https://cdn.jsdelivr.net/npm/vditor/src/assets/images/logo.png">
<link rel="dns-prefetch" href="//unpkg.com/"/>
<link rel="preconnect" href="https://unpkg.com">
<link rel="icon" type="image/png" href="https://unpkg.com/vditor/dist/images/logo.png"/>
<link rel="apple-touch-icon" href="https://unpkg.com/vditor/dist/images/logo.png">
<link rel="shortcut icon" type="image/x-icon" href="https://unpkg.com/vditor/dist/images/logo.png">
<meta name="copyright" content="B3log"/>
<meta http-equiv="Window-target" content="_top"/>
<meta property="og:locale" content="zh-cmn-Hans"/>
Expand All @@ -34,8 +34,8 @@
content="Vditor: ♏ An In-browser Markdown editor, support WYSIWYG, Instant Rendering (Typora-like) and Split View modes. 一款浏览器端的 Markdown 编辑器,支持所见即所得、即时渲染(类似 Typora)和分屏预览模式。"/>
<meta name="twitter:site" content="@B3logOS"/>
<meta name="twitter:url" content="https://b3log.org/vditor"/>
<meta property="og:image" content="https://cdn.jsdelivr.net/npm/vditor/src/assets/images/logo.png"/>
<meta name="twitter:image" content="https://cdn.jsdelivr.net/npm/vditor/src/assets/images/logo.png"/>
<meta property="og:image" content="https://unpkg.com/vditor/dist/images/logo.png"/>
<meta name="twitter:image" content="https://unpkg.com/vditor/dist/images/logo.png"/>
<style>
body {
margin: 0;
Expand All @@ -51,8 +51,8 @@
color: #4285f4;
}
</style>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vditor@3.8.13/dist/index.css">
<script src="https://cdn.jsdelivr.net/npm/vditor@3.8.13/dist/index.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/vditor@3.8.13/dist/index.css">
<script src="https://unpkg.com/vditor@3.8.13/dist/index.min.js"></script>
</head>
<body>
<div class="vditor-reset nav">
Expand Down
2 changes: 1 addition & 1 deletion src/ts/constants.ts
Expand Up @@ -29,7 +29,7 @@ export abstract class Constants {
// ext
"solidity", "yul"
];
public static readonly CDN = `https://cdn.jsdelivr.net/npm/vditor@${VDITOR_VERSION}`;
public static readonly CDN = `https://unpkg.com/vditor@${VDITOR_VERSION}`;
public static readonly MARKDOWN_OPTIONS = {
autoSpace: false,
codeBlockPreview: true,
Expand Down
2 changes: 1 addition & 1 deletion src/ts/toolbar/Info.ts
Expand Up @@ -12,7 +12,7 @@ export class Info extends MenuItem {
<em>下一代的 Markdown 编辑器,为未来而构建</em>
</p>
<div style="display: flex;margin-bottom: 14px;flex-wrap: wrap;align-items: center">
<img src="https://cdn.jsdelivr.net/npm/vditor/src/assets/images/logo.png" style="margin: 0 auto;height: 68px"/>
<img src="https://unpkg.com/vditor/dist/images/logo.png" style="margin: 0 auto;height: 68px"/>
<div>&nbsp;&nbsp;</div>
<div style="flex: 1;min-width: 250px">
Vditor 是一款浏览器端的 Markdown 编辑器,支持所见即所得、即时渲染(类似 Typora)和分屏预览模式。
Expand Down

0 comments on commit 225f3f6

Please sign in to comment.