https://github.com/thinkwee/hexo-translation-switch
A hexo plugin for switching your post in different languages
https://github.com/thinkwee/hexo-translation-switch
Last synced: 2 months ago
JSON representation
A hexo plugin for switching your post in different languages
- Host: GitHub
- URL: https://github.com/thinkwee/hexo-translation-switch
- Owner: thinkwee
- Created: 2024-11-28T10:57:48.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-12-11T08:29:59.000Z (5 months ago)
- Last Synced: 2025-01-28T20:47:21.327Z (4 months ago)
- Language: JavaScript
- Size: 258 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![]()
The Translation Plugin for Hexo Next-Theme Blog
# hexo-translation-switch
- A [Hexo](https://hexo.io/zh-cn/) plugin that enables seamless switching between multiple language versions of your posts. It is suitable for the hexo [next](https://github.com/next-theme/hexo-theme-next) theme.
- Check example [here](https://thinkwee.top/2024/04/23/next-on-llm/#more)# 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
```bash
npm install hexo-translation-switch
```## Usage
- organize your post like
```markdown
---
title: xxxxx
date: 2024-xx-xx xx:xx:xx
categories: xxxx
tags:
- xx
- xx
---
some text....{% 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.
- [x] if the titles of chinese/english post are the same, the chinese toc will not work.
- [x] some animation does not behave as smoothly as original next theme. (Now fixed)## License
MIT
## Author
thinkwee