Skip to content
Discussion options

You must be logged in to vote

Hexo 这边,对于多语言的每个语言的首页,我提交了一个 PR,不知道会不会被通过,整合了 xcatliu/hexo-generator-index-i18n: I18n index generator plugin for Hexo 这里面的功能,实现和 hexojs/hexo-generator-index: Index generator plugin for Hexo兼容,添加下面两个功能:

  1. 可以生成多语言各自的首页
  2. 可以根据需要调整默认首页的是否显示所有语言的文章

NexT 这边我感觉就是下面这段改成不需要区分默认语言和其他语言就可以了,但不了解对其他东西是否有影响,实际上如果是设置多语言的博客,感觉设置 permalink: :lang/:title/ 是比较合理的,这样就是默认语言的文章也有这个 :lang 的前缀,只要保持 post 的结构是下面这样的,就可以实现用下面的按钮进行直接切换(如果文章存在)

└── workspace/
    └── source/
        ├── _posts/
        │   ├── en/
        │   │   ├── welcome.md
        │   │   ├── blogpost.md
        │   │   └── ...
        │   └── de/
        │       ├── welcome.md
        │       ├── blogpost.md
        │       └── ...
hexo.extend.h…

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by fish-404
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants