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: more i18n & fix config/index.md typo #313

Merged
merged 1 commit into from
Jan 7, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/pages/guide/best-pratice.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ useScriptTag('//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js')

<template>
<div>
<div>本站总访问量 <span id="busuanzi_value_site_pv" /> </div>
<div>本站访客数 <span id="busuanzi_value_site_uv" /> 人次</div>
<div>Total visits to this site <span id="busuanzi_value_site_pv" /> times</div>
<div>Visitors to this site <span id="busuanzi_value_site_uv" /></div>
</div>
</template>
```
Expand Down
26 changes: 25 additions & 1 deletion docs/pages/guide/config/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ end: false
::: zh-CN
为了便于配置,Valaxy 将配置分为了三种。

`valaxy.config.ts` 是配置的主入口,它包含了一下配置
`valaxy.config.ts` 是配置的主入口,它包含了以下配置

- `siteConfig`: 站点**信息**配置,这部分内容面向站点展示且在任何主题也是通用的格式
- `themeConfig`: 主题配置,这部分内容仅在特定主题生效
Expand Down Expand Up @@ -189,6 +189,7 @@ export default defineSiteConfig({

### Default Frontmatter

::: zh-CN
为所有文章设置默认的 Frontmatter。

譬如:
Expand All @@ -208,6 +209,29 @@ export default defineSiteConfig({
}
})
```
:::

::: en
Set the default Frontmatter for all posts.

For example:

> Set `time_warning: false` so that all articles won't show reading time warnings.

```ts {8-10}
// site.config.ts
import { defineSiteConfig } from 'valaxy'

export default defineSiteConfig({
/**
* Default Frontmatter
*/
frontmatter: {
time_warning: false,
}
})
```
:::

### 社交图标 {lang="zh-CN"}

Expand Down
10 changes: 9 additions & 1 deletion docs/pages/guide/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,17 @@ npm i valaxy-theme-yun@latest
pnpm up --latest -i
```

## 迁移
## Migration {lang="en"}

## 迁移 {lang="zh-CN"}

::: en
If you are from another blog framework, you can refer to [Migration](/migration/).
:::

::: zh-CN
如果你来自其他博客框架,可参考 [迁移](/migration/)。
:::

## Directory Structure {lang="en"}

Expand Down
23 changes: 21 additions & 2 deletions docs/pages/migration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,35 @@ categories:
top: 10
---

## 从 Hexo 迁移至 Valaxy
## 从 Hexo 迁移至 Valaxy {lang="zh-CN"}

## Migrate from Hexo to Valaxy {lang="en"}

::: zh-CN
- [从 Hexo 迁移至 Valaxy](/migration/hexo)
:::

::: en
- [Migrate from Hexo to Valaxy](/migration/hexo)
:::

## 从其他任意博客框架迁移
## 从其他任意博客框架迁移 {lang="zh-CN"}

## Migrate from any other blog framework {lang="en"}

::: zh-CN
- 将你的文章(Markdown 文件)复制至 Valaxy `pages/posts` 目录下。
- 将你的自定义页面(非文章的 Markdown/HTML 文件)复制至 Valaxy `pages` 目录下。
- 将你的静态资源(图片等)复制至 Valaxy `public` 目录下。
- 参考 [配置](/guide/config/) 配置你的配置文件 `valaxy.config.ts`/`site.config.ts`。
:::

::: en
- Copy your posts (Markdown files) to the Valaxy `pages/posts` directory.
- Copy your custom pages (non-article Markdown/HTML files) to the Valaxy `pages` directory.
- Copy your static resources (images, etc.) to the Valaxy `public` directory.
- Configure your configuration file `valaxy.config.ts`/`site.config.ts` by referring to [configuration](/guide/config/).
:::

## 常见问题 {lang="zh-CN"}

Expand Down
Loading