Skip to content

Commit

Permalink
修改默认语言为中文
Browse files Browse the repository at this point in the history
  • Loading branch information
Chiichen committed Oct 28, 2023
1 parent 2cde2d6 commit 0dffa8f
Show file tree
Hide file tree
Showing 145 changed files with 121 additions and 121 deletions.
11 changes: 6 additions & 5 deletions src/.vuepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@ export default defineUserConfig({
port: 10086,
locales: {
"/": {
lang: "en-US",
title: "ChiChen's Blog",
description: "A blog of a",
},
"/zh/": {
lang: "zh-CN",
title: "ChiChen's Blog",
description: "vuepress-theme-hope 的博客演示",
},
"/en/": {
lang: "en-US",
title: "ChiChen's Blog",
description: "A blog of a",

},
},

theme,
Expand Down
4 changes: 2 additions & 2 deletions src/.vuepress/navbar/en.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { navbar } from "vuepress-theme-hope";

export const enNavbar = navbar([
"/",
"/en/",
{
text: "Posts",
icon: "edit",
prefix: "/posts/",
prefix: "/en/posts/",
children: [
// {
// text: "Apple",
Expand Down
5 changes: 2 additions & 3 deletions src/.vuepress/navbar/zh.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { navbar } from "vuepress-theme-hope";

export const zhNavbar = navbar([
"/zh/",
{ text: "演示", icon: "discover", link: "/zh/demo/" },
"/",
{
text: "博文",
icon: "edit",
prefix: "/zh/posts/",
prefix: "/posts/",
children: [
{
text: "编译原理",
Expand Down
2 changes: 1 addition & 1 deletion src/.vuepress/sidebar/en.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { sidebar } from "vuepress-theme-hope";

export const enSidebar = sidebar({
"/": [
"/en/": [
"",
{
text: "Articles",
Expand Down
2 changes: 1 addition & 1 deletion src/.vuepress/sidebar/zh.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { sidebar } from "vuepress-theme-hope";

export const zhSidebar = sidebar({
"/zh/": [
"/": [
"",
{
text: "文章",
Expand Down
8 changes: 4 additions & 4 deletions src/.vuepress/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default hopeTheme({
},

locales: {
"/": {
"/en/": {
// navbar
navbar: enNavbar,

Expand All @@ -71,7 +71,7 @@ export default hopeTheme({

blog: {
description: "A FrontEnd programmer",
intro: "/intro.html",
intro: "/en/intro.html",
},

metaLocales: {
Expand All @@ -82,7 +82,7 @@ export default hopeTheme({
/**
* Chinese locale config
*/
"/zh/": {
"/": {
// navbar
navbar: zhNavbar,

Expand All @@ -95,7 +95,7 @@ export default hopeTheme({

blog: {
description: "一个前端开发者",
intro: "/zh/intro.html",
intro: "/intro.html",
},

// page meta
Expand Down
71 changes: 33 additions & 38 deletions src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,42 @@
home: true
layout: BlogHome
icon: home
title: Blog Home
title: 博客主页
heroImage: /logo.svg
heroText: ChiChen's Blog
tagline: A true master is an eternal student
heroText: Chi
heroFullScreen: true
tagline: EveryBody dies but not everybody lives
projects:
- icon: project
name: project name
desc: project detailed description
link: https://your.project.link

- icon: link
name: link name
desc: link detailed description
link: https://link.address

- icon: book
name: book name
desc: Detailed description of the book
link: https://link.to.your.book

- icon: article
name: article name
desc: Detailed description of the article
link: https://link.to.your.article

- icon: friend
name: friend name
desc: Detailed description of friend
link: https://link.to.your.friend

- icon: /logo.svg
name: custom item
desc: Detailed description of this custom item
link: https://link.to.your.friend

footer: customize your footer text
name: DragonOS
desc: Rust开发的服务器操作系统
link: https://github.com/DragonOS-Community/DragonOS

# - icon: link
# name: 链接名称
# desc: 链接详细描述
# link: https://链接地址

# - icon: book
# name: 书籍名称
# desc: 书籍详细描述
# link: https://你的书籍链接

# - icon: article
# name: 文章名称
# desc: 文章详细描述
# link: https://你的文章链接

# - icon: friend
# name: 伙伴名称
# desc: 伙伴详细介绍
# link: https://你的伙伴链接

# - icon: /logo.svg
# name: 自定义项目
# desc: 自定义详细介绍
# link: https://你的自定义链接

footer:
---

This is a blog home page demo.

To use this layout, you should set both `layout: BlogHome` and `home: true` in the page front matter.

For related configuration docs, please see [blog homepage](https://theme-hope.vuejs.press/guide/blog/home/).
48 changes: 48 additions & 0 deletions src/en/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
home: true
layout: BlogHome
icon: home
title: Blog Home
heroImage: /logo.svg
heroText: ChiChen's Blog
tagline: A true master is an eternal student
heroFullScreen: true
projects:
- icon: project
name: project name
desc: project detailed description
link: https://your.project.link

- icon: link
name: link name
desc: link detailed description
link: https://link.address

- icon: book
name: book name
desc: Detailed description of the book
link: https://link.to.your.book

- icon: article
name: article name
desc: Detailed description of the article
link: https://link.to.your.article

- icon: friend
name: friend name
desc: Detailed description of friend
link: https://link.to.your.friend

- icon: /logo.svg
name: custom item
desc: Detailed description of this custom item
link: https://link.to.your.friend

footer: customize your footer text
---

This is a blog home page demo.

To use this layout, you should set both `layout: BlogHome` and `home: true` in the page front matter.

For related configuration docs, please see [blog homepage](https://theme-hope.vuejs.press/guide/blog/home/).
8 changes: 8 additions & 0 deletions src/en/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
icon: info
cover: /assets/images/cover3.jpg
---

# Intro Page

Place your introduction and profile here.
14 changes: 6 additions & 8 deletions src/zh/posts/template.md → src/en/posts/template.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
---
title: template
# cover: /assets/images/cover1.jpg

icon: page
# This control sidebar order
order: 1
author: ChiChen
date: 2023/10/24
date: template
category:
- none
-
tag:
- none
# this page is sticky in article list
sticky: false
# this page will appear in starred articles
-
sticky: true
star: false
footer:
isOriginal: true
copyright: 转载请注明出处
copyright: Copyright with marking the source
article: false
index: false
---
4 changes: 2 additions & 2 deletions src/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ icon: info
cover: /assets/images/cover3.jpg
---

# Intro Page
# 介绍页

Place your introduction and profile here.
将你的个人介绍和档案放置在此处。
File renamed without changes.
14 changes: 8 additions & 6 deletions src/posts/template.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
---
title: template
# cover: /assets/images/cover1.jpg

icon: page
# This control sidebar order
order: 1
author: ChiChen
date: template
date: 2023/10/24
category:
-
- none
tag:
-
sticky: true
- none
# this page is sticky in article list
sticky: false
# this page will appear in starred articles
star: false
footer:
copyright: Copyright with marking the source
isOriginal: true
copyright: 转载请注明出处
article: false
index: false
---
File renamed without changes.
43 changes: 0 additions & 43 deletions src/zh/README.md

This file was deleted.

8 changes: 0 additions & 8 deletions src/zh/intro.md

This file was deleted.

0 comments on commit 0dffa8f

Please sign in to comment.