I’m still quite fond of my current Hexo theme. From using its predecessor material-x in 2021 to upgrading to Volantis 5.x in 2023, the theme’s functionality has completely met my personal needs, to the point where I haven’t upgraded to the author’s subsequent versions 6 and 7. However, after using AI to batch-translate my blog content into English earlier this year, there have been persistent issues with some interface elements remaining in Chinese. This year, instead of undertaking major renovations, I decided to fix these minor bugs myself under AI guidance.
Problem Background
Since using AI tools to batch-translate my blog content into English, my blog has had both Chinese and English versions. But during the modification process, two issues emerged:
- Some component switching effects were invalid in the English site, such as tabs on the “About Me” page that couldn’t switch when clicked
- Many elements on the theme interface remained in Chinese, and the visitor statistics at the bottom of the page always displayed fixed Chinese content that was clearly forgotten during the multilingual support implementation.
After examining the theme’s code, I felt the former was a configuration issue, while the latter was more due to the Hexo framework itself. For example, many titles and category headings on the page were directly encoded in the configuration file. Deepseek suggested that a simpler approach in Hexo would be to prepare two configuration files directly. My current setup already uses separate folders for the Chinese and English sites, and after practical testing, I found that both issues could be resolved by modifying the configuration files in the Volantis code. Therefore, I ultimately chose to write two patch files and place them in my blog project.
Solutions
1. The Switching Issue
From browser error messages, when I set the English site’s root to /en/, the path for the app.js file on the page was incorrectly set to /en/en/js/app.js. This file should be responsible for implementing the switching effects. When the file couldn’t be found, the switching effects were lost.
According to Deepseek’s explanation, modifying the CDN settings in _config.yml could solve the problem. The specific diff is as follows:
1 | --- a/_config.yml |
2. Incomplete English Localization
These issues were simpler to fix - just replace the title of the display sections with English and remove the unused parts at the bottom of the page.
1 | --- a/_config.yml |
3. Patch Generation
After saving the above modifications, git commit, then you can use git diff COMMIT1 COMMIT2 > PATCH_FILE to generate a patch.
Since I cloned the original volantis project code and modified it to generate the patch, the file paths in the patch file are incorrect. You need to modify the following path in the patch file to the actual file path:
1 | --- a/_config.yml |
Additionally, the index 91bd9709..9304175e 100644 above needs to be removed, otherwise it will fail due to commit verification.
Conclusion
Since the second quarter of this year, as my department gradually dwindled to just me, all the websites and systems that the company needs to maintain have fallen into my hands… If AI hadn’t saved me, I absolutely wouldn’t have been able to handle analysis work while maintaining all these front-end and back-end systems simultaneously. Nor would I have been able to fix these minor blog bugs with just a bit of common knowledge now… But just like my experience with AI last year, my upper limit determines AI’s upper limit. When we can’t judge whether the solutions we get are right or wrong, we can only spin in circles like a little dog chasing its own tail…