We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2858ed5 commit 3ab4800Copy full SHA for 3ab4800
docs/.vitepress/plugins/mirror.ts
@@ -141,6 +141,10 @@ export const transformHtml = (code: string) => {
141
if (!code.includes('/assets/')) return;
142
// 注意: 如果使用 htmlparser2+dom-serializer, 当 md 文件包含 `<<n` 将出现 Hydration mismatches 错误
143
const doc = new Parser().parseFromString(code, 'text/html');
144
+ const meta = doc.createElement('meta');
145
+ meta.name = 'version';
146
+ meta.content = selfPkg.version;
147
+ doc.head.insertBefore(meta, doc.head.firstChild);
148
Object.entries({
149
link: 'href',
150
script: 'src',
0 commit comments