feat: 删除无用依赖,shiki lang使用懒加载方式加载语言

This commit is contained in:
2026-08-16 13:29:58 +08:00
parent 070a63133d
commit be2e6f1ae0
9 changed files with 54 additions and 1131 deletions

View File

@@ -140,6 +140,8 @@ const published_at = formatDatetime(data.published_at, "YYYY.MM.DD");
const article = document.querySelector(".markdown-body")!;
const images = Array.from(article.querySelectorAll("img"));
if(images.length === 0) return
const waitImageLoaded = (img: HTMLImageElement) => {
if (img.complete && img.naturalWidth > 0 && img.naturalHeight > 0) {
return Promise.resolve();