-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
base: master
Are you sure you want to change the base?
Conversation
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. |
There was a problem hiding this 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?
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: 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. |
As shown in the figure