mirror of
https://github.com/labring/sealos.git
synced 2026-09-24 15:46:19 +08:00
feat:docs add blog (#4298)
This commit is contained in:
@@ -639,5 +639,8 @@
|
||||
},
|
||||
"Explore": {
|
||||
"message": "了解更多"
|
||||
},
|
||||
"Blog": {
|
||||
"message": "博客"
|
||||
}
|
||||
}
|
||||
@@ -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: [
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
@@ -27,6 +27,11 @@ const navbar = [
|
||||
label: <Translate>Hosting</Translate>,
|
||||
to: '/self-hosting '
|
||||
},
|
||||
{
|
||||
key: 'blog',
|
||||
label: <Translate>Blog</Translate>,
|
||||
to: '/blog'
|
||||
},
|
||||
{
|
||||
key: 'contact',
|
||||
label: <Translate>Contact</Translate>,
|
||||
|
||||
@@ -11,9 +11,10 @@ import HomeHeader from './components/Header';
|
||||
import Introduce from './components/Introduce';
|
||||
import HomeUserBy from './components/UserBy';
|
||||
import './index.scss';
|
||||
import Head from '@docusaurus/Head';
|
||||
|
||||
const Home = () => {
|
||||
const { screenWidth, cloudUrl } = useWindow();
|
||||
const { screenWidth, cloudUrl, currentLanguage } = useWindow();
|
||||
const isPc = useMemo(() => screenWidth > PC_MIN_WIDTH, [screenWidth]);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -44,6 +45,13 @@ const Home = () => {
|
||||
|
||||
const HomeRender = (
|
||||
<div id="sealos-layout-wrap-home-page">
|
||||
<Head>
|
||||
<title>
|
||||
{currentLanguage === 'en'
|
||||
? 'Sealos'
|
||||
: 'Sealos: 专为云原生开发打造的以 K8s 为内核的云操作系统'}
|
||||
</title>
|
||||
</Head>
|
||||
<Helmet>
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=AW-786053845" />
|
||||
<script async>
|
||||
|
||||
@@ -24,7 +24,12 @@ const navbar = [
|
||||
{
|
||||
key: 'hosting',
|
||||
label: <Translate>Hosting</Translate>,
|
||||
to: '/self-hosting '
|
||||
to: '/self-hosting'
|
||||
},
|
||||
{
|
||||
key: 'blog',
|
||||
label: <Translate>Blog</Translate>,
|
||||
to: '/blog'
|
||||
},
|
||||
{
|
||||
key: 'contact',
|
||||
|
||||
@@ -93,9 +93,13 @@ export default function SigninComponent() {
|
||||
if (isAgree && selectedConfig) {
|
||||
const { login } = selectedConfig;
|
||||
login();
|
||||
uploadConvertData([3]).then((res) => {
|
||||
console.log(res);
|
||||
});
|
||||
uploadConvertData([3])
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
} else {
|
||||
setIsInvalid(true);
|
||||
showError(t('Read and agree'));
|
||||
|
||||
@@ -93,9 +93,13 @@ export default function SigninComponent() {
|
||||
if (isAgree && selectedConfig) {
|
||||
const { login } = selectedConfig;
|
||||
login();
|
||||
uploadConvertData([3]).then((res) => {
|
||||
console.log(res);
|
||||
});
|
||||
uploadConvertData([3])
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
} else {
|
||||
setIsInvalid(true);
|
||||
showError(t('Read and agree'));
|
||||
|
||||
@@ -31,7 +31,6 @@ export default function Tutorial({
|
||||
let { fileNameParams, bashParams, ossVersion } = useMemo(() => {
|
||||
if (ossFileUrl) {
|
||||
let match = /cloud-(.*?)\.tar/g.exec(ossFileUrl);
|
||||
console.log(match);
|
||||
return {
|
||||
fileNameParams: ossFileUrl.replace('/cloud/', ''),
|
||||
bashParams: match ? `--cloud-version=${match[1]}` : '--cloud-version v5.0.0-beta1',
|
||||
@@ -102,9 +101,7 @@ export default function Tutorial({
|
||||
fontSize={'14px'}
|
||||
fontWeight={600}
|
||||
onClick={() =>
|
||||
window.open(
|
||||
'https://sealos.io/zh-Hans/docs/self-hosting/installation#%E5%87%86%E5%A4%87%E5%B7%A5%E4%BD%9C'
|
||||
)
|
||||
window.open('https://sealos.io/zh-Hans/docs/self-hosting/sealos/installation')
|
||||
}
|
||||
>
|
||||
详细文档
|
||||
@@ -172,7 +169,7 @@ export default function Tutorial({
|
||||
<AccordionPanel py="20px" pl="40px" gap={'12px'}>
|
||||
<CodeBlock
|
||||
language="bash"
|
||||
code={`curl -sfL https://raw.githubusercontent.com/labring/sealos/${ossVersion}/scripts/cloud/install.sh -o /tmp/install.sh && bash /tmp/install.sh ${bashParams}`}
|
||||
code={`curl -sfL https://gh-proxy.com/https://raw.githubusercontent.com/labring/sealos/main/scripts/cloud/install.sh -o /tmp/install.sh && bash /tmp/install.sh \ --image-registry=registry.cn-shanghai.aliyuncs.com --zh \ --proxy-prefix=https://gh-proxy.com`}
|
||||
></CodeBlock>
|
||||
<Center
|
||||
borderRadius={'4px'}
|
||||
@@ -185,9 +182,7 @@ export default function Tutorial({
|
||||
fontSize={'14px'}
|
||||
fontWeight={600}
|
||||
onClick={() =>
|
||||
window.open(
|
||||
'https://sealos.io/zh-Hans/docs/self-hosting/installation#%E5%AE%89%E8%A3%85%E6%AD%A5%E9%AA%A4'
|
||||
)
|
||||
window.open('https://sealos.io/zh-Hans/docs/self-hosting/sealos/installation')
|
||||
}
|
||||
>
|
||||
详细文档
|
||||
|
||||
Reference in New Issue
Block a user