From 24eb909aef6973a4bf4a07704be0ac9cc3d0887f Mon Sep 17 00:00:00 2001
From: jingyang <3161362058@qq.com>
Date: Wed, 15 Nov 2023 11:18:05 +0800
Subject: [PATCH] feat:docs add blog
Signed-off-by: jingyang <3161362058@qq.com>
---
docs/website/docusaurus.config.js | 5 +++++
.../i18n/zh-Hans/docusaurus-theme-classic/navbar.json | 6 +++++-
docs/website/src/components/NavBanner/index.tsx | 2 +-
docs/website/src/pages/components/Header/index.tsx | 5 +++++
docs/website/src/pages/self-hosting/header/index.tsx | 7 ++++++-
5 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/docs/website/docusaurus.config.js b/docs/website/docusaurus.config.js
index c3d9a7e0cb7..e202132422c 100644
--- a/docs/website/docusaurus.config.js
+++ b/docs/website/docusaurus.config.js
@@ -107,6 +107,11 @@ const config = {
to: "/self-hosting",
label: "Hosting"
},
+ {
+ position: "left",
+ to: "/blog",
+ label: "Blog"
+ },
{
position: "left",
to: "https://fael3z0zfze.feishu.cn/share/base/form/shrcnesSfEK65JZaAf2W6Fwz6Ad",
diff --git a/docs/website/i18n/zh-Hans/docusaurus-theme-classic/navbar.json b/docs/website/i18n/zh-Hans/docusaurus-theme-classic/navbar.json
index de15b047c55..308f1554f85 100644
--- a/docs/website/i18n/zh-Hans/docusaurus-theme-classic/navbar.json
+++ b/docs/website/i18n/zh-Hans/docusaurus-theme-classic/navbar.json
@@ -18,5 +18,9 @@
"item.label.Start Now": {
"message": "在线使用",
"description": "Navbar item with label Start Now"
+ },
+ "item.label.Blog": {
+ "message": "博客",
+ "description": "Navbar item with label Blog"
}
-}
+}
\ No newline at end of file
diff --git a/docs/website/src/components/NavBanner/index.tsx b/docs/website/src/components/NavBanner/index.tsx
index 2573b9b67ef..ccc32330857 100644
--- a/docs/website/src/components/NavBanner/index.tsx
+++ b/docs/website/src/components/NavBanner/index.tsx
@@ -22,7 +22,7 @@ export default function NavBanner({
useEffect(() => {
const lastCloseTimestamp = +localStorage.getItem('bannerCloseTimestamp');
if (
- window.location.hostname === 'localhost' &&
+ window.location.hostname === 'sealos.io' &&
(!lastCloseTimestamp || Date.now() - lastCloseTimestamp > 7 * 24 * 60 * 60 * 1000)
) {
setIsBannerVisible(true);
diff --git a/docs/website/src/pages/components/Header/index.tsx b/docs/website/src/pages/components/Header/index.tsx
index 92a4e0320eb..202e14d3b87 100644
--- a/docs/website/src/pages/components/Header/index.tsx
+++ b/docs/website/src/pages/components/Header/index.tsx
@@ -27,6 +27,11 @@ const navbar = [
label: Hosting,
to: '/self-hosting '
},
+ {
+ key: 'blog',
+ label: Blog,
+ to: '/blog'
+ },
{
key: 'contact',
label: Contact,
diff --git a/docs/website/src/pages/self-hosting/header/index.tsx b/docs/website/src/pages/self-hosting/header/index.tsx
index bddc4d068a5..5a6cba99ce2 100644
--- a/docs/website/src/pages/self-hosting/header/index.tsx
+++ b/docs/website/src/pages/self-hosting/header/index.tsx
@@ -24,7 +24,12 @@ const navbar = [
{
key: 'hosting',
label: Hosting,
- to: '/self-hosting '
+ to: '/self-hosting'
+ },
+ {
+ key: 'blog',
+ label: Blog,
+ to: '/blog'
},
{
key: 'contact',