move img.title generator to Video component

This commit is contained in:
polv committed 2026-02-03 12:58:31 +07:00
1 parent 62c6775e67
commit 8fc5e03758
2 files changed
+18 -33

No files matched your search

-15
View File
@@ -30,21 +30,6 @@ export default defineConfig({
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,