docs: more i18n & fix config/index.md typo (#313)

This commit is contained in:
MoeToo 2024-01-08 01:04:13 +08:00 committed by GitHub
parent 5b50a47870
commit fba5426cc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 57 additions and 6 deletions

View File

@ -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>
```

View File

@ -13,7 +13,7 @@ end: false
::: zh-CN
为了便于配置Valaxy 将配置分为了三种。
`valaxy.config.ts` 是配置的主入口,它包含了下配置。
`valaxy.config.ts` 是配置的主入口,它包含了下配置。
- `siteConfig`: 站点**信息**配置,这部分内容面向站点展示且在任何主题也是通用的格式
- `themeConfig`: 主题配置,这部分内容仅在特定主题生效
@ -189,6 +189,7 @@ export default defineSiteConfig({
### Default Frontmatter
::: zh-CN
为所有文章设置默认的 Frontmatter。
譬如:
@ -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"}

View File

@ -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"}

View File

@ -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"}