Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable the search function to have a summary #585

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

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?

i18n/zh.yaml Outdated Show resolved Hide resolved
@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