new: Use CDN to accelerate all static resources

This commit is contained in:
2025-01-22 23:07:31 +08:00
parent 635198570a
commit 47affe5edf
13 changed files with 132 additions and 164 deletions

View File

@@ -40,7 +40,7 @@ function setTheme() {
const logo = document.querySelector(".main-logo-img")
if (logo !== null) {
logo.style.setProperty("background-image", `url(../assets/img/logo-${theme}-theme.png)`);
logo.style.setProperty("background-image", `url(http://molly-blog.cdn.yvling.cn/assets/img/logo-${theme}-theme.png)`);
}
}
@@ -57,7 +57,7 @@ function replaceCssFile() {
const links = document.querySelectorAll('link[rel="stylesheet"]');
for (const link of links) {
if (link.href.includes(oldHref)) {
link.href = "../assets/css/lib/" + newHref;
link.href = "http://molly-blog.cdn.yvling.cn/assets/css/lib/" + newHref;
break;
}
}