jerryc127 / hexo-theme-butterfly

🦋 A Hexo Theme: Butterfly

Home Page:https://butterfly.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature]: 添加多语言支持或配置教程

Kuro1Fury opened this issue · comments

想要的功能 | What feature do you want?

如题。我看到closed issue有人问过相似的问题,请问不打算支持多语言的话能否出一期配置教程,感谢!

@Kuro1Fury https://hexo.io/zh-cn/docs/internationalization

不止是ui显示的语言,我是希望像butterfly.js.org现在这样有中英文blog分开显示的功能

文档使用的多语言采用了最‘笨’的方法,就是中文和英文各自生成一份,放在同一个地方。
你可以查看 jerryc127/butterfly.js.org: Butterfly 的文檔/ Demo 倉庫 (github.com) 的目录
image
运行
mv _config.butterfly.yml config2.yml && mv config-butterfly-en.yml _config.butterfly.yml && hexo clean && hexo g --config="config-en.yml" && mv -f config2.yml _config.butterfly.yml && hexo clean && hexo g && mv --force public-en/ public/en/ && gulp

具体就是 先生成英文到 en 目录下,然后生成中文
这个方法推荐在 vercel 上或者 action 上使用,因为生成时,需要替代掉 _config_butterfly,yml。

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.