From 16492fb753cb5f6bb025ddfc4edf18ca148fd20b 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>
fix
docs done
license
license
---
docs/4.0/code.json | 3 +++
docs/website/docusaurus.config.js | 21 ++++++++++++++++++-
.../docusaurus-theme-classic/navbar.json | 6 +++++-
.../src/components/NavBanner/index.tsx | 2 +-
.../src/pages/components/Header/index.tsx | 5 +++++
docs/website/src/pages/index.tsx | 10 ++++++++-
.../src/pages/self-hosting/header/index.tsx | 7 ++++++-
.../license/src/components/Signin/index.tsx | 10 ++++++---
.../license/src/components/signin/index.tsx | 10 ++++++---
.../src/pages/cluster/components/Tutorial.tsx | 11 +++-------
10 files changed, 66 insertions(+), 19 deletions(-)
diff --git a/docs/4.0/code.json b/docs/4.0/code.json
index e1e56bf77f0..c1b5200eb92 100644
--- a/docs/4.0/code.json
+++ b/docs/4.0/code.json
@@ -639,5 +639,8 @@
},
"Explore": {
"message": "了解更多"
+ },
+ "Blog": {
+ "message": "博客"
}
}
\ No newline at end of file
diff --git a/docs/website/docusaurus.config.js b/docs/website/docusaurus.config.js
index c3d9a7e0cb7..1a00d8991b3 100644
--- a/docs/website/docusaurus.config.js
+++ b/docs/website/docusaurus.config.js
@@ -4,7 +4,7 @@ const generateAlgoliKey = () => "ce5b8e1e4d0d35ff587caf75ac404df4"
/** @type {import('@docusaurus/types').Config} */
const config = {
- title: "sealos",
+ title: "Sealos: 专为云原生开发打造的以 K8s 为内核的云操作系统",
tagline: "Kubernetes-kernel-based cloud os! Let's sealos run kubernetes",
url: "https://sealos.io/",
baseUrl: "/",
@@ -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",
@@ -216,6 +221,20 @@ const config = {
name: 'baidu-site-verification',
content: 'codeva-E1X5UKtV9p',
},
+ },
+ {
+ tagName: 'meta',
+ attributes: {
+ name: 'description',
+ content: '高效管理你的云原生应用程序,像使用个人电脑一样在 Kubernetes 上一键安装编程语言、低代码开发平台、WordPress、数据库、AI 软件和 IM 软件。',
+ }
+ },
+ {
+ tagName: 'meta',
+ attributes: {
+ name: 'keywords',
+ content: 'Sealos, K8s, 云操作系统, 低代码开发平台, 数据库',
+ }
}
],
plugins: [
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: