This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris-website.git
The following commit(s) were added to refs/heads/master by this push: new d7150980658 Fixed resource loading issue (#1963) d7150980658 is described below commit d715098065824215f17d9610141e66f698fa2d5f Author: yangon <2689991...@qq.com> AuthorDate: Wed Feb 5 16:01:12 2025 +0800 Fixed resource loading issue (#1963) 1. Migrate pdf from cdn to the current directory. 2. Fix the problem that workerjs files are not loaded  --- .github/workflows/cron-deploy-website.yml | 1 - src/constant/download.data.ts | 6 +++--- src/theme/SearchBar/searchByWorker.js | 18 ++++++++++-------- worker.js => src/theme/SearchBar/worker.js | 0 static/pdf/Apache_Doris_v2_0_0b89998444.pdf | Bin 0 -> 12441177 bytes static/pdf/Apache_Doris_v2_1_c8bc030188.pdf | Bin 0 -> 14756143 bytes static/pdf/Apache_Doris_v3_0_4412376f6e.pdf | Bin 0 -> 15755677 bytes 7 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.github/workflows/cron-deploy-website.yml b/.github/workflows/cron-deploy-website.yml index 796da1ee3aa..eeb1105444e 100644 --- a/.github/workflows/cron-deploy-website.yml +++ b/.github/workflows/cron-deploy-website.yml @@ -39,7 +39,6 @@ jobs: export NODE_OPTIONS=--max-old-space-size=8192 yarn && yarn build node ./scripts/update_search_hash.js - cp worker.js ./build/ touch build/.dummy cp .asf-site.yaml ./build/.asf.yaml cp versions.json ./build/ diff --git a/src/constant/download.data.ts b/src/constant/download.data.ts index d320279a60f..ba88d84490c 100644 --- a/src/constant/download.data.ts +++ b/src/constant/download.data.ts @@ -1970,16 +1970,16 @@ export const DOWNLOAD_PDFS = [ { version: '3.0', filename: 'Apache Doris 中文手册(v3.0).pdf', - link: 'https://cdn.selectdb.com/static/Apache_Doris_v3_0_4412376f6e.pdf', + link: 'https://doris.apache.org/pdf/Apache_Doris_v3_0_4412376f6e.pdf', }, { version: '2.1', filename: 'Apache Doris 中文手册(v2.1).pdf', - link: 'https://cdn.selectdb.com/static/Apache_Doris_v2_1_c8bc030188.pdf', + link: 'https://doris.apache.org/pdf/Apache_Doris_v2_1_c8bc030188.pdf', }, { version: '2.0', filename: 'Apache Doris 中文手册(v2.0).pdf', - link: 'https://cdn.selectdb.com/static/Apache_Doris_v2_0_0b89998444.pdf', + link: 'https://doris.apache.org/pdf/Apache_Doris_v2_0_0b89998444.pdf', }, ]; diff --git a/src/theme/SearchBar/searchByWorker.js b/src/theme/SearchBar/searchByWorker.js index caf0810dcf6..d41480bbbe4 100644 --- a/src/theme/SearchBar/searchByWorker.js +++ b/src/theme/SearchBar/searchByWorker.js @@ -1,16 +1,18 @@ import * as Comlink from 'comlink'; let remoteWorkerPromise; -function getWorkerURL(url) { - const content = `importScripts( "${url}" );`; - return URL.createObjectURL(new Blob([content], { type: 'text/javascript' })); -} +// function getWorkerURL(url) { +// const content = `importScripts( "${url}" );`; +// return URL.createObjectURL(new Blob([content], { type: 'text/javascript' })); +// } function getRemoteWorker() { if (process.env.NODE_ENV === 'production' && !remoteWorkerPromise) { remoteWorkerPromise = (async () => { - const timestamp = Date.now(); - const Remote = Comlink.wrap( - new Worker(getWorkerURL(`https://doris.apache.org/worker.js?_=${timestamp}`)), - ); + // const timestamp = Date.now(); + // const Remote = Comlink.wrap( + // new Worker(getWorkerURL(`https://doris.apache.org/worker.js?_=${timestamp}`)), + // ); + const url = new URL("./worker.js", import.meta.url); + const Remote = Comlink.wrap(new Worker(url)); return await new Remote(); })(); } diff --git a/worker.js b/src/theme/SearchBar/worker.js similarity index 100% rename from worker.js rename to src/theme/SearchBar/worker.js diff --git a/static/pdf/Apache_Doris_v2_0_0b89998444.pdf b/static/pdf/Apache_Doris_v2_0_0b89998444.pdf new file mode 100644 index 00000000000..b6236fd095b Binary files /dev/null and b/static/pdf/Apache_Doris_v2_0_0b89998444.pdf differ diff --git a/static/pdf/Apache_Doris_v2_1_c8bc030188.pdf b/static/pdf/Apache_Doris_v2_1_c8bc030188.pdf new file mode 100644 index 00000000000..dafb43d7cec Binary files /dev/null and b/static/pdf/Apache_Doris_v2_1_c8bc030188.pdf differ diff --git a/static/pdf/Apache_Doris_v3_0_4412376f6e.pdf b/static/pdf/Apache_Doris_v3_0_4412376f6e.pdf new file mode 100644 index 00000000000..b015a27a9e3 Binary files /dev/null and b/static/pdf/Apache_Doris_v3_0_4412376f6e.pdf differ --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org