Skip to content
This repository has been archived by the owner on Dec 8, 2023. It is now read-only.

Commit

Permalink
feat: remove unused related resources code
Browse files Browse the repository at this point in the history
  • Loading branch information
aswanson-nr authored and tabathadelane committed Jan 27, 2022
1 parent c0d3377 commit ff5004b
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,14 @@ module.exports = {
engineKey: 'Ad9HfGjDw4GRkcmJjUut',
limit: 5,
getSlug: ({ node }) => {
if (node.internal.type === 'Mdx') {
return node.fields.slug;
} else if (node.internal.type === 'Quickstarts') {
if (node.internal.type === 'Quickstarts') {
return resolveQuickstartSlug(node.name, node.id);
}
},
getParams: ({ node }) => {
let tags = [];
let title = '';
if (node.frontmatter) {
tags = node.frontmatter.tags;
title = node.frontmatter.title;
} else {
tags = node.keywords;
title = node.title;
}
let tags = node.keywords;
let title = node.title;

return {
q: tags ? tags.map(quote).join(' OR ') : title,
search_fields: {
Expand All @@ -79,9 +71,7 @@ module.exports = {
},
};
},
filter: ({ node }) =>
node.frontmatter?.template === 'GuideTemplate' ||
node.internal.type === 'Quickstarts',
filter: ({ node }) => node.internal.type === 'Quickstarts',
},
},
newrelic: {
Expand Down

0 comments on commit ff5004b

Please sign in to comment.