Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs:support lang env #4288

Merged
merged 2 commits into from Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/website/Dockerfile
@@ -1,5 +1,6 @@
FROM node:20.4 AS builder

ARG SEALOS_LANG=zh-Hans
ARG BD_TOKEN
ENV BD_TOKEN=$BD_TOKEN

Expand Down
5 changes: 3 additions & 2 deletions docs/website/docusaurus.config.js
@@ -1,4 +1,5 @@
// @ts-check
require('dotenv').config()

const generateAlgoliKey = () => "ce5b8e1e4d0d35ff587caf75ac404df4"

/** @type {import('@docusaurus/types').Config} */
Expand All @@ -19,7 +20,7 @@ const config = {
// metadata like html lang. For example, if your site is Chinese, you may want
// to replace "en" with "zh-Hans".
i18n: {
defaultLocale: "en",
defaultLocale: process.env.SEALOS_LANG || 'en',
locales: ["en", "zh-Hans"],
// path: "../4.0/i18n"
},
Expand Down
1 change: 1 addition & 0 deletions docs/website/package.json
Expand Up @@ -24,6 +24,7 @@
"@mdx-js/react": "^1.6.22",
"autoprefixer": "^10.4.16",
"docusaurus-plugin-sass": "^0.2.2",
"dotenv": "^16.3.1",
"postcss": "^8.4.31",
"prism-react-renderer": "^1.3.5",
"prismjs": "^1.29.0",
Expand Down
5 changes: 5 additions & 0 deletions docs/website/yarn.lock
Expand Up @@ -3661,6 +3661,11 @@ dot-prop@^5.2.0:
dependencies:
is-obj "^2.0.0"

dotenv@^16.3.1:
version "16.3.1"
resolved "https://registry.npmmirror.com/dotenv/-/dotenv-16.3.1.tgz#369034de7d7e5b120972693352a3bf112172cc3e"
integrity sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==

duplexer3@^0.1.4:
version "0.1.5"
resolved "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.5.tgz"
Expand Down