Skip to content

A hexo plugin for switching your post in different languages

Notifications You must be signed in to change notification settings

thinkwee/hexo-translation-switch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Translation Robot Logo

The Translation Plugin for Hexo Next-Theme Blog

hexo-translation-switch

  • A Hexo plugin that enables seamless switching between multiple language versions of your posts. It is suitable for the hexo next theme.
  • Check example here

Features

  • only change your post between chinese/english
  • a seperate bottom for switching language
  • with an automatically generated table of contents for each language.

Installation

  • clone this repo then
npm install hexo-translation-switch

Usage

  • organize your post like
---
title: xxxxx
date: 2024-xx-xx xx:xx:xx
categories: xxxx
tags:
  - xx
  - xx
---
some text....
<!--more-->
{% language_switch %}

{% lang_content en %}
YOUR_ENGLISH_POST_HERE
{% endlang_content %}

{% lang_content zh %}
YOUR_CHINESE_POST_HERE
{% endlang_content %}
  • where you can use language_switch to put your language switch buttom and use lang_content to wrap your post in different languages

Known Issues (working on it)

  • only works for hexo next theme.
  • if the titles of chinese/english post are the same, the chinese toc will not work.
  • some animation does not behave as smoothly as original next theme. (Now fixed)

License

MIT

Author

thinkwee

About

A hexo plugin for switching your post in different languages

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published