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

fix: i18n title #98

Merged
merged 1 commit into from
Nov 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
const LATEST_VERSION_LABEL = '2.8.x(Latest)';

import type { Options as IdealImageOptions } from '@docusaurus/plugin-ideal-image';
import type * as Preset from '@docusaurus/preset-classic';
import type { Config } from '@docusaurus/types';
import type {Options as IdealImageOptions} from '@docusaurus/plugin-ideal-image';
import { themes as prismThemes } from 'prism-react-renderer';

function geti18nTitle() {
switch(process.env.DOCUSAURUS_CURRENT_LOCALE) {
case "en": return "GoFrame Official Website - A Go Enterprise-Level Development Framework Similar to PHP-Laravel and Java-SpringBoot";
default: return "GoFrame官网 - 类似PHP-Laravel,Java-SpringBoot的Go企业级开发框架";
}
}

// https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-docs#markdown-front-matter
// https://docusaurus.io/zh-CN/docs/api/docusaurus-config
const config: Config = {
title: 'GoFrame官网 - 类似PHP-Laravel,Java-SpringBoot的Go企业级开发框架',
title: geti18nTitle(),
tagline:
'GoFrame is a modular, powerful, high-performance and enterprise-class application development framework of Golang.',
favicon: '/img/favicon.ico',
Expand Down