add video and fix filename for md
This commit is contained in:
1 parent
00033e0341
commit
2b47af46de
5 files changed
+1496
-2
No files matched your search
@@ -26,6 +26,26 @@ export default defineConfig({
|
||||
{ icon: 'github', link: 'https://github.com/vuejs/vitepress' }
|
||||
]
|
||||
},
|
||||
markdown: {
|
||||
image: {
|
||||
lazyLoading: true,
|
||||
},
|
||||
config(md) {
|
||||
md.renderer.rules.image = function (tokens, idx, options, env, slf) {
|
||||
const token = tokens[idx];
|
||||
|
||||
// Get the alt if it exists
|
||||
const alt = token.attrGet('alt') || token.content || '';
|
||||
|
||||
// Fill the title attribute with the alt if it exists
|
||||
if (!token.attrGet('title')) {
|
||||
token.attrSet('title', alt);
|
||||
}
|
||||
|
||||
return slf.renderToken(tokens, idx, options)
|
||||
}
|
||||
}
|
||||
},
|
||||
vite: {
|
||||
clearScreen: false,
|
||||
server: {
|
||||
|
||||
Reference in new issue
Block a user