You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by su...@apache.org on 2021/10/24 03:23:39 UTC
[apisix-website] branch master updated: chore: support CDN to load
all JS bundle files (#670)
This is an automated email from the ASF dual-hosted git repository.
sunyi 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 a35449a chore: support CDN to load all JS bundle files (#670)
a35449a is described below
commit a35449a4546081a35f9cc843168d7854f3d0bde3
Author: 琚致远 <ju...@apache.org>
AuthorDate: Sun Oct 24 11:23:36 2021 +0800
chore: support CDN to load all JS bundle files (#670)
---
.github/workflows/deploy.yml | 2 ++
website/docusaurus.config.js | 8 ++++----
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 4d4850b..2f0c133 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -41,6 +41,8 @@ jobs:
run: |
cd website && yarn build
cp ../.asf.yaml ./build
+ # NOTE: Use jsDelivr to load JS files from the asf-site branch
+ sed -i 's/return"assets\/js\/"/return"https:\/\/cdn.jsdelivr.net\/gh\/apache\/apisix-website@asf-site\/assets\/js\/"/g' ./build/assets/js/runtime~main.**.js
- name: Deploy
uses: peaceiris/actions-gh-pages@v3.8.0
diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js
index 081a032..f3cb365 100644
--- a/website/docusaurus.config.js
+++ b/website/docusaurus.config.js
@@ -8,7 +8,7 @@ module.exports = {
baseUrl: "/",
organizationName: "Apache",
projectName: "apisix-website",
- favicon: "img/favicon.png",
+ favicon: "https://cdn.jsdelivr.net/gh/apache/apisix-website@asf-site/img/favicon.png",
customFields: {
tagline2:
"Apache APISIX software provides rich traffic management features such as load balancing, dynamic upstream, canary release, circuit breaking, authentication, observability, and more.",
@@ -421,7 +421,7 @@ module.exports = {
hideOnScroll: true,
title: "Apache APISIX®",
logo: {
- src: "img/logo2.svg",
+ src: "https://cdn.jsdelivr.net/gh/apache/apisix-website@asf-site/img/logo2.svg",
},
items: [
{
@@ -594,7 +594,7 @@ module.exports = {
],
logo: {
alt: "Apache Software Foundation",
- src: "img/asf_logo_wide_small.png",
+ src: "https://cdn.jsdelivr.net/gh/apache/apisix-website@asf-site/img/asf_logo_wide_small.png",
href: "https://www.apache.org/",
},
@@ -623,7 +623,7 @@ module.exports = {
disableSwitch: false,
respectPrefersColorScheme: false,
},
- image: 'img/favicon.png',
+ image: 'https://cdn.jsdelivr.net/gh/apache/apisix-website@asf-site/img/favicon.png',
metadatas: [
{
name: "description",