gf-dcc / docs

Docs written by the Gray Foundation Data Coordinating Center (GF-DCC) that describe the consortium portal, data, metadata, and other topics
https://docs.graybrcaatlas.org
0 stars 1 forks source link

Set up Algolia search configuration #79

Open anngvu opened 6 months ago

anngvu commented 6 months ago

The Algolia search shows indexed content as null, which explains why there are no results. Look into how to do the configuration correctly and document. Linked to #74.

anngvu commented 6 months ago

(Original)

      recordExtractor: ({ helpers }) => {
        return helpers.docsearch({
          recordProps: {
            lvl1: ["header h1", "article h1", "main h1", "h1", "head > title"],
            content: ["article p, article li", "main p, main li", "p, li"],
            lvl0: {
              selectors: "",
              defaultValue: "Documentation",
            },
            lvl2: ["article h2", "main h2", "h2"],
            lvl3: ["article h3", "main h3", "h3"],
            lvl4: ["article h4", "main h4", "h4"],
            lvl5: ["article h5", "main h5", "h5"],
            lvl6: ["article h6", "main h6", "h6"],
          },
          aggregateContent: true,
          recordVersion: "v3",
        });
      },
    },
  ],