This is an automated email from the ASF dual-hosted git repository.
juzhiyuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-website.git
The following commit(s) were added to refs/heads/master by this push:
new 86a5a63 feat: support jsDelivr CDN to speedup static files (#668)
86a5a63 is described below
commit 86a5a63c15e3829cf0d0576fd1c1fd4a9cf63133
Author: ηθ΄θΏ <[email protected]>
AuthorDate: Fri Oct 22 00:37:24 2021 +0800
feat: support jsDelivr CDN to speedup static files (#668)
---
scripts/sync-docs.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/sync-docs.js b/scripts/sync-docs.js
index d9ef271..2943f90 100644
--- a/scripts/sync-docs.js
+++ b/scripts/sync-docs.js
@@ -296,7 +296,7 @@ const replaceMDElements = (project, path, branch =
"master") => {
from:
/(\.\.\/)+assets\/images\/[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]/g,
to: (match) => {
const imgPath = match.replace(/\(|\)|\.\.\/*/g, "");
- const newUrl =
`https://raw.githubusercontent.com/apache/${project}/${branch}/docs/${imgPath}`;
+ const newUrl =
`https://cdn.jsdelivr.net/gh/apache/${project}@${branch}/docs/${imgPath}`;
//console.log(`${project}: ${match} π ${newUrl}`);
return newUrl;
},