diff --git a/docs/index.md b/docs/index.md index 092840b8..a02abd64 100644 --- a/docs/index.md +++ b/docs/index.md @@ -54,3 +54,6 @@ VitePress is future oriented: VitePress only targets browsers that support nativ We already have [vuepress-next](https://github.com/vuepress/vuepress-next), which would be the next major version of VuePress. It also makes lots of improvements over VuePress v1, and also supports Vite now. VitePress is not compatible with the current VuePress ecosystem (mostly themes and plugins). The overall idea is that VitePress will have a drastically more minimal theming API (preferring JavaScript APIs instead of file layout conventions) and likely no plugins (all customization is done in themes). + + +![sdsd](/vue-logo.png "Title Here") diff --git a/docs/public/vue-logo.png b/docs/public/vue-logo.png new file mode 100644 index 00000000..b3b94f2a Binary files /dev/null and b/docs/public/vue-logo.png differ diff --git a/src/node/markdown/plugins/image.ts b/src/node/markdown/plugins/image.ts index 641a04c7..c6393a5e 100644 --- a/src/node/markdown/plugins/image.ts +++ b/src/node/markdown/plugins/image.ts @@ -10,6 +10,11 @@ export const imagePlugin = (md: MarkdownIt) => { if (url && !EXTERNAL_URL_RE.test(url) && !/^\.?\//.test(url)) { token.attrSet('src', './' + url) } + + // https://github.com/markdown-it/markdown-it/blob/1529ff4944329eb8080a8558dab85164b6c212cd/lib/renderer.js#L101 + if (token.attrIndex('alt') && token.children !== null) { + token.attrs![token.attrIndex('alt')][1] = self.renderInlineAsText(token.children, options, env); + } return self.renderToken(tokens, idx, options) } }