You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, I believe that it's harmful to h1. e.g. https://docusaurus.io/ doesn't have an anchor. The value is so that people get a cleaner URL when they copy and paste it to share after a search, which happens quite often in my use cases.
I had to add this code so that the crawler won't pick up an anchor for the lvl1.
recordExtractor: ({ $, helpers, url }) => {
// Removing DOM elements we don't want to crawl
const toRemove = ".skip-algolia-crawler";
$(toRemove).remove();
+ $("#main-content, #__next").removeAttr("id");
Description
https://docsearch.algolia.com/docs/tips/#add-anchors-to-headings and https://docsearch.algolia.com/docs/required-configuration/#use-the-right-classes-as-recordprops makes a lot of sense for h2,h3,h4, etc.
However, I believe that it's harmful to h1. e.g. https://docusaurus.io/ doesn't have an anchor. The value is so that people get a cleaner URL when they copy and paste it to share after a search, which happens quite often in my use cases.
I had to add this code so that the crawler won't pick up an anchor for the lvl1.
recordExtractor: ({ $, helpers, url }) => { // Removing DOM elements we don't want to crawl const toRemove = ".skip-algolia-crawler"; $(toRemove).remove(); + $("#main-content, #__next").removeAttr("id");
Steps to reproduce
I could reproduce on: https://mui.com/material-ui/react-alert/ with https://crawler.algolia.com/admin/crawlers/739c29c8-99ea-4945-bd27-17a1df391902/configuration/edit.
I get this URL: https://mui.com/material-ui/react-alert/#main-content.
Expected behavior
helpers.docsearch
doesn't try to find an anchor for h1.I would get this URL: https://mui.com/material-ui/react-alert/.
Environment
The text was updated successfully, but these errors were encountered: