Browse Source

chore: sitemap update login ignore non semi site

DaiQiangReal 6 tháng trước cách đây
mục cha
commit
3f00ea4ba6
1 tập tin đã thay đổi với 6 bổ sung0 xóa
  1. 6 0
      scripts/sitemap_update.js

+ 6 - 0
scripts/sitemap_update.js

@@ -44,6 +44,12 @@ const main = async ()=>{
         const item = urlMap[url];
         promiseList.push(new Promise(async (resolve, reject)=>{
             try {
+                if (!url.startsWith("https://semi.design")) {
+                    console.log(`SiteMap jump over ${url}  ${count}/${urls.length}`);
+                    count++;
+                    resolve();
+                    return;
+                }
                 const res = await axios.get(url);
                 if (url.startsWith("https://semi.design/zh-CN") || url.startsWith("https://semi.design/en-US")) {
                     const lang = url.startsWith("https://semi.design/zh-CN") ? "zh-CN" : "en-US";