The objects in my Index don't have a content

Hi ! I’m using the jekyll-algolia plugin for a documentation website.

I’ve pushed my docs to Algolia, but what I don’t understand is that I can not put “content” as a searchable attribute. When I do I have this message: “We couldn’t find the attribute content in a small sample of your records”.

The only configuration I put in my yml file, beside API key, ID etc, is:

  nodes_to_index: 'docs'
      - md

Thank you for your help !

Hi! If you go into the Algolia dashboard, how do the records look there? Do they have a content attribute? By default, the plugin should create one record per paragraph (<p>), but you can change this using nodes_to_index to point to a different CSS element to represent each of your records.

Here’s an old but still relevant blog post on configuring the plugin to index records – let me know if it helps.

Hi! I did not have the content attribute and it was indeed related to nodes_to_index. I removed the option entirely in my _config.yml and now I have the content attribute. Thank you for your help!

1 Like

That old blog post helped me. Thank you!