Cytrogen 的个人博客

万圣节恶魔的领地

马上订阅 Cytrogen 的个人博客 RSS 更新: https://cytrogen.icu/atom.xml

Hexo i18n Configuration

2024年12月3日 11:37

When running a personal blog, you might encounter this requirement: wanting your website to support multiple languages so that readers from different regions can easily read your content.

This is where website internationalization (also known as i18n) comes into play.

For blogs built with Hexo, implementing internationalization requires consideration not only of content translation but also template rendering and other issues.

  • This article primarily uses the hexo-generator-plus plugin.

    kiwirafe/hexo-generator-plus - GitHub

    Before starting the configuration, please ensure you have uninstalled the following plugins to avoid conflicts:

    • hexo-generator-archive
    • hexo-generator-category
    • hexo-generator-index
    • hexo-generator-tag
  • This article uses the Pug templating language.

  • For the language switching solution in the navigation bar, I have only implemented bilingual logic.

剩余内容已隐藏

查看完整文章以阅读更多