You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by ju...@apache.org on 2022/03/20 12:51:54 UTC
[apisix-website] 01/01: feat: use github cdn
This is an automated email from the ASF dual-hosted git repository.
juzhiyuan pushed a commit to branch feat-use-github-cdn
in repository https://gitbox.apache.org/repos/asf/apisix-website.git
commit 706ddf5790c462ace4eb43dd9279bbdf071ba78c
Author: juzhiyuan <ju...@apache.org>
AuthorDate: Sun Mar 20 20:51:34 2022 +0800
feat: use github cdn
---
scripts/sync-docs.js | 2 +-
website/config/ssrTemplate.js | 2 +-
website/src/css/customTheme.css | 10 +++++-----
website/src/pages/sections/endcta.jsx | 2 +-
website/src/pages/showcase/index.js | 2 +-
5 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/scripts/sync-docs.js b/scripts/sync-docs.js
index 81f3bb2..0078346 100644
--- a/scripts/sync-docs.js
+++ b/scripts/sync-docs.js
@@ -200,7 +200,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://cdn.jsdelivr.net/gh/apache/${project}@${branch}/docs/${imgPath}`;
+ const newUrl = `https://raw.githubusercontent.com/apache/${project}/${branch}/docs/${imgPath}`;
//console.log(`${project}: ${match} 👉 ${newUrl}`);
return newUrl;
},
diff --git a/website/config/ssrTemplate.js b/website/config/ssrTemplate.js
index d089a15..54320b5 100644
--- a/website/config/ssrTemplate.js
+++ b/website/config/ssrTemplate.js
@@ -1,4 +1,4 @@
-const CDN_URL = 'https://cdn.jsdelivr.net/gh/apache/apisix-website@asf-site'
+const CDN_URL = 'https://raw.githubusercontent.com/apache/apisix-website/asf-site'
module.exports = {
ssrTemplate: `<!DOCTYPE html>
diff --git a/website/src/css/customTheme.css b/website/src/css/customTheme.css
index 4d60f22..c27cb02 100644
--- a/website/src/css/customTheme.css
+++ b/website/src/css/customTheme.css
@@ -54,27 +54,27 @@ html[data-theme="dark"] {
@font-face {
font-family: 'MaisonNeue-Medium';
- src: local('MaisonNeue-Medium'), url(https://cdn.jsdelivr.net/gh/apache/apisix-website@master/website/src/fonts/MaisonNeue-Medium.otf) format('opentype');
+ src: local('MaisonNeue-Medium'), url(https://raw.githubusercontent.com/apache/apisix-website/master/website/src/fonts/MaisonNeue-Medium.otf) format('opentype');
font-display: swap;
}
@font-face {
font-family: 'MaisonNeue-Bold';
- src: local('MaisonNeue-Bold'), url(https://cdn.jsdelivr.net/gh/apache/apisix-website@master/website/src/fonts/MaisonNeue-Bold.otf) format('opentype');
+ src: local('MaisonNeue-Bold'), url(https://raw.githubusercontent.com/apache/apisix-website/master/website/src/fonts/MaisonNeue-Bold.otf) format('opentype');
font-display: swap;
}
@font-face {
font-family: 'MaisonNeue-Light';
- src: local('MaisonNeue-Light'), url(https://cdn.jsdelivr.net/gh/apache/apisix-website@master/website/src/fonts/MaisonNeue-Light.otf) format('opentype');
+ src: local('MaisonNeue-Light'), url(https://raw.githubusercontent.com/apache/apisix-website/master/website/src/fonts/MaisonNeue-Light.otf) format('opentype');
font-display: swap;
}
@font-face {
font-family: 'MaisonNeue-Demi';
- src: local('MaisonNeue-Demi'), url(https://cdn.jsdelivr.net/gh/apache/apisix-website@master/website/src/fonts/MaisonNeue-Demi.otf) format('opentype');
+ src: local('MaisonNeue-Demi'), url(https://raw.githubusercontent.com/apache/apisix-website/master/website/src/fonts/MaisonNeue-Demi.otf) format('opentype');
font-display: swap;
}
@font-face {
font-family: 'MaisonNeue-ExtraBold';
- src: local('MaisonNeue-ExtraBold'), url(https://cdn.jsdelivr.net/gh/apache/apisix-website@master/website/src/fonts/MaisonNeue-ExtraBold.otf) format('opentype');
+ src: local('MaisonNeue-ExtraBold'), url(https://raw.githubusercontent.com/apache/apisix-website/master/website/src/fonts/MaisonNeue-ExtraBold.otf) format('opentype');
font-display: swap;
}
diff --git a/website/src/pages/sections/endcta.jsx b/website/src/pages/sections/endcta.jsx
index e1cb863..34a8174 100644
--- a/website/src/pages/sections/endcta.jsx
+++ b/website/src/pages/sections/endcta.jsx
@@ -10,7 +10,7 @@ const EndCTA = () => {
<>
<div className="endcta" style={{padding: "50px 0", background: "#FF90A3", margin: "0 0 -32px 0"}}>
<div className="endcta-text">
- <p style={{display: "flex", justifyContent: "center", alignItems: "center", whiteSpace: "pre"}}>Try <span style={{color: "#E8433E"}}>APISIX</span> today <img className="rocket" src="https://cdn.jsdelivr.net/gh/apache/apisix-website@master/website/src/assets/images/rocket.gif" alt="Rocket"/></p>
+ <p style={{display: "flex", justifyContent: "center", alignItems: "center", whiteSpace: "pre"}}>Try <span style={{color: "#E8433E"}}>APISIX</span> today <img className="rocket" src="https://raw.githubusercontent.com/apache/apisix-website/master/website/src/assets/images/rocket.gif" alt="Rocket"/></p>
</div>
<div className="endcta-btns">
<div className="hero-ctas">
diff --git a/website/src/pages/showcase/index.js b/website/src/pages/showcase/index.js
index f8fae12..8cdc636 100644
--- a/website/src/pages/showcase/index.js
+++ b/website/src/pages/showcase/index.js
@@ -43,7 +43,7 @@ const Content = (props) => {
const showcases = siteConfig.customFields.showcases.map((user) => (
<div className="col col--2 item" key={user.infoLink}>
<UserCard
- image={'https://cdn.jsdelivr.net/gh/apache/apisix-website@master/website/static/img/' + user.image}
+ image={'https://raw.githubusercontent.com/apache/apisix-website/master/website/static/img/' + user.image}
caption={user.caption}
infoLink={user.infoLink}
/>