probberechts / hexo-theme-cactus

:cactus: A responsive, clean and simple theme for Hexo.
https://probberechts.github.io/hexo-theme-cactus/
MIT License
3.15k stars 784 forks source link

Page title exception of archives page. #344

Closed ghost closed 1 year ago

ghost commented 1 year ago

After I set the language to zh CN, the page titles of other pages are normally displayed as zh CN, but the header text of the built-in archives page is abnormal and displayed as Arabic. منشورات

probberechts commented 1 year ago

That's odd. Did you try running hexo clean already?

ghost commented 1 year ago

That's odd. Did you try running hexo clean already?

Yes, I tried many methods, including hexo clean, and the results were the same. The others were displayed normally, but the tag page title of the archive page was displayed abnormally

probberechts commented 1 year ago

Just to be clear, you are refering to the <title> tag, right?

Does it change to English if you set the language in _config.yml to

language:
- zh-CN
- en
ghost commented 1 year ago

澄清一下,你指的是<title>标签,对吗?

_config.yml如果您将语言设置为,它会更改为英语吗

language:
- zh-CN
- en

If it is changed to en, the title is writing, and if it is changed to zh CN, the title is منشورات

ghost commented 1 year ago

IMG20230106005446.jpg

probberechts commented 1 year ago

This is the relevant code that sets the title of the archive page: https://github.com/probberechts/hexo-theme-cactus/blob/f44dcaf1404bef7645fc92d7c06b2bfbef06c45a/scripts/page_title.js#L11

The nav.articles variable is replaced with https://github.com/probberechts/hexo-theme-cactus/blob/f44dcaf1404bef7645fc92d7c06b2bfbef06c45a/languages/zh-CN.yml#L4

I do not see what would be wrong here. Hence, I am afraid I cannot solve it. If you manage to debug it, let me know.

ghost commented 1 year ago

This is the relevant code that sets the title of the archive page:

https://github.com/probberechts/hexo-theme-cactus/blob/f44dcaf1404bef7645fc92d7c06b2bfbef06c45a/scripts/page_title.js#L11

The nav.articles variable is replaced with

https://github.com/probberechts/hexo-theme-cactus/blob/f44dcaf1404bef7645fc92d7c06b2bfbef06c45a/languages/zh-CN.yml#L4

I do not see what would be wrong here. Hence, I am afraid I cannot solve it. If you manage to debug it, let me know.

the problem has been solved, thank you for your patient reply.

probberechts commented 1 year ago

What was the solution?

ghost commented 1 year ago

解决方案是什么?

/languages/zh-CN.yml as a result of articles: 归档 is modified to article: 归档 by me