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

Search for e.g. custom-property-pattern lead to 404 even though doc for it exists. #286

Closed
DerZyklop opened this issue Oct 19, 2022 · 4 comments

Comments

@DerZyklop
Copy link

DerZyklop commented Oct 19, 2022

Describe the documentation issue

When I go to https://stylelint.io/ and search for custom-property-pattern I get a result in the search-results-card. When i click it/hit enter it brings me to a 404 on
user-guide/rules/list/#custom-property-1
when i reload i get redirected to
user-guide/rules/#custom-property-1
The last mentioned page has already an entry for the patterns of this PR, but the correct anchor link would be #pattern
Anyway… there is also a own page for custom-property-pattern:
user-guide/rules/custom-property-pattern/

Related: stylelint/stylelint#6391

What solution would you like to see?

A search for custom-property-pattern brings me to https://stylelint.io/user-guide/rules/custom-property-pattern/

@ybiquitous
Copy link
Member

ybiquitous commented Oct 19, 2022

@DerZyklop Thanks for the report. This issue seems related to the website repo instead of this stylelint/stylelint repository.

@ybiquitous ybiquitous transferred this issue from stylelint/stylelint Oct 19, 2022
@ybiquitous
Copy link
Member

Maybe, I guess this issue is related to Algolia search. We may need to update the search index or something else.

@jeddy3
Copy link
Member

jeddy3 commented Oct 19, 2022

@DerZyklop Thanks for the report. I've fixed the issue.

You were right, @ybiquitous. It was related to Algolia search. I've not delved into the Algolia control panel before, but figured this was probably the right time to learn how it all works. You'll find the access details for Algolia in the shared password vault if you're curious to take a look yourself. I triggered a new crawl. (You'll find that option under "Data sources" (in the bottom right) and then "Crawler".)

A search for custom-property-pattern brings me to https://stylelint.io/user-guide/rules/custom-property-pattern/

The new crawl picked up the new URLs, i.e. /rules/<name> rather than /rules/list/<name>. However, the search results for "custom-property-pattern" did not include the actual page for the rule, only the mention of it on the list page. I believe this was a long-standing issue we've had since updating to Docusaurus 2. It seemed <h1>s weren't being indexed. I dug deeper and tweaked the configuration for the crawler itself (you'll find this under the "Editor" menu option within the "Crawler" app) so that <h1> are indexed.

The search results seem clearer now, with hierarchies shown. For example:

Screenshot 2022-10-19 at 23 04 57

And with the actual rule pages appearing in the results:

Screenshot 2022-10-19 at 23 05 43

@jeddy3 jeddy3 closed this as completed Oct 19, 2022
@ybiquitous
Copy link
Member

@jeddy3 Thank you so much for fixing the issue and sharing knowledge about the Aloglia search! 🙌🏼

I could touch the Algolia control panel and crawler editor, and then understand what you explained.

We now have a much better experience with searching on the website! 😄

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

No branches or pull requests

3 participants