Skip to content

Commit

Permalink
feat:docs add blog
Browse files Browse the repository at this point in the history
Signed-off-by: jingyang <3161362058@qq.com>

fix

docs done

license

license
  • Loading branch information
zjy365 committed Nov 15, 2023
1 parent 56772da commit 16492fb
Show file tree
Hide file tree
Showing 10 changed files with 66 additions and 19 deletions.
3 changes: 3 additions & 0 deletions docs/4.0/code.json
Expand Up @@ -639,5 +639,8 @@
},
"Explore": {
"message": "了解更多"
},
"Blog": {
"message": "博客"
}
}
21 changes: 20 additions & 1 deletion docs/website/docusaurus.config.js
Expand Up @@ -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: "/",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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: [
Expand Down
Expand Up @@ -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"
}
}
}
2 changes: 1 addition & 1 deletion docs/website/src/components/NavBanner/index.tsx
Expand Up @@ -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);
Expand Down
5 changes: 5 additions & 0 deletions docs/website/src/pages/components/Header/index.tsx
Expand Up @@ -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>,
Expand Down
10 changes: 9 additions & 1 deletion docs/website/src/pages/index.tsx
Expand Up @@ -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(() => {
Expand Down Expand Up @@ -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>
Expand Down
7 changes: 6 additions & 1 deletion docs/website/src/pages/self-hosting/header/index.tsx
Expand Up @@ -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',
Expand Down
10 changes: 7 additions & 3 deletions service/license/src/components/Signin/index.tsx
Expand Up @@ -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'));
Expand Down
10 changes: 7 additions & 3 deletions service/license/src/components/signin/index.tsx
Expand Up @@ -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'));
Expand Down
11 changes: 3 additions & 8 deletions service/license/src/pages/cluster/components/Tutorial.tsx
Expand Up @@ -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',
Expand Down Expand Up @@ -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')
}
>
详细文档
Expand Down Expand Up @@ -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'}
Expand All @@ -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')
}
>
详细文档
Expand Down

0 comments on commit 16492fb

Please sign in to comment.