Hexo常用技巧

Hexo common tips

多语种支持

若要建立一个多语种的网站,您可修改 new_post_name 和 permalink 参数,如下:

1
2
new_post_name: :lang/:title.md
permalink: :lang/:title/

当您建立新文章时,文章会被储存到:

1
2
$ hexo new "Hello World" --lang tw
# => source/_posts/tw/Hello-World.md

而网址会是:

1
http://localhost:4000/tw/hello-world/
Author

Runcheng XIA

Posted on

2024-07-14

Updated on

2024-07-21

Licensed under

Your browser is out-of-date!

Update your browser to view this website correctly.&npsb;Update my browser now

×