"keep_tags": ["code"] β€” what does this do?

In a bunch of the DocSearch configuration files here, I see the following:

...
},
  "keep_tags": [
    "code"
  ],
...

For example, it appears in these:

- zapier.json
- salesforce_vscode.json
- fuse.json


I cannot find anything documented about it. What does it do?  And, when is it useful? Is it supported?

Thanks,
Steve

:wave: @stevebang,

The keep_tags is a parameter that is used to let the crawler know it should not remove these specifics tags from the content scraped. Usually, we remove every HTML specific code before to index it to Algolia. It is useful when you want to define a specific style in the dropdown based on the tag from the original website. You can find an example here:

We haven’t documented it because we estimate that this feature is not mature enough but is still useful for some specific use-cases.

Thanks, Sylvain. That helps.

1 Like