Gatsby-theme-novela: An error will occur if the article title is in Chinese

Created on 20 Nov 2019  路  3Comments  路  Source: narative/gatsby-theme-novela

Version of Novela you are using
^0.10.3

Number of posts you have and which data source
10 posts, Local

Describe the bug
When I write the title in Chinese, the home page of the website will be wrong.
The homepage is like the details page of the article that you entered, but you can't return to the homepage by clicking the logo on the head.But I wrote the title in English and everything is normal.

To Reproduce
Steps to reproduce the behavior:

  1. Choose any article
  2. Change the title to Chinese
  3. Start local server
  4. Open homepage

Expected behavior
I want my blog to change the embarrassed scenes of the content to be Chinese, but the title is in English.

Screenshots
鍥剧墖

Browser

  • Chrome

Additional context
Null

Most helpful comment

I just experienced a similar issue. It also broke my index page: instead of showing the correct index page with posts, instead a Chinese-language article page was displayed. Once I set a manual slug for all Chinese and Japanese-language post titles, the issue resolved itself and the index page went back to normal.

All 3 comments

Ah, it must be failing when building the URL as the chinese characters break it.
What if you manually set the Slug for the article that has a chinese title? Does that fix your issue?

https://github.com/narative/gatsby-theme-novela#post

Very Good! But at first I didn't understand how to configure it, then see other issues to understand. thank you! 馃槉

I just experienced a similar issue. It also broke my index page: instead of showing the correct index page with posts, instead a Chinese-language article page was displayed. Once I set a manual slug for all Chinese and Japanese-language post titles, the issue resolved itself and the index page went back to normal.

Was this page helpful?
0 / 5 - 0 ratings