Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
主题和文章的翻译机制大概都通了,每种场景都给了示例。语言选择入口还没加,请直接访问多语言 URL 参与翻译。使用方法如下:
翻译主题文件
在语言文件(
themes/san/languages/{en, zh-cn}.yml
)中定义变量,在主题文件(themes/san/layout/*.ejs
)中引用,如有需要在source
下建立多语言入口。已有示例如下:/themes/san/layout/index.ejs
翻译文章文件
在
source/_post/en/
中添加对应的翻译文件,直接访问对应的多语言 URL 即可预览。已有示例如下:/source/_posts/doc/api.md
/source/_posts/en/doc/api.md
示例也可以参考上述 PR 中的 diff。