Skip to content

Conversation

@Deng-Xian-Sheng
Copy link

@Deng-Xian-Sheng Deng-Xian-Sheng commented Jan 30, 2024

As shown in the figure

image

@Deng-Xian-Sheng
Copy link
Author

If the "content = doc.querySelector('#content').querySelector('article').textContent" in the first 100 lines does not work properly, try changing it to "content = doc.querySelector('article').textContent"

Please merge after the main branch test is functioning properly.

Copy link

@eskopp eskopp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that the comments are in Chinese. Could you please write the comments in English so that everyone can understand them?

@Deng-Xian-Sheng
Copy link
Author

I have modified the language of the comments and the images.

Once again, please start the project locally and ensure the search function is working properly before merging into the main branch.

As for why this is necessary, actually, it works fine on my blog, there's no problem with that. However, the theme of my blog is slightly different from your official theme. I made modifications (using Hugo's feature layouts/posts/single.html), so I haven't tested this search function on the official theme (completely unchanged). I believe this is something you should do.

I'm too tired to test this for the official theme.

As mentioned before:
If the "content = doc.querySelector('#content').querySelector('article').textContent" in the first 100 lines does not work properly, try changing it to "content = doc.querySelector('article').textContent".

Please merge after the main branch test is functioning properly.

This is also reflected in the code comments.

I hope it works well on the blogs of thousands of people.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants