Skip to content

Commit

Permalink
excerpt field returns the necessary description for the release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
cade-conklin committed Sep 8, 2021
1 parent d01e36c commit cd9bc22
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
6 changes: 3 additions & 3 deletions gatsby-config.js
Expand Up @@ -455,19 +455,19 @@ module.exports = {
releaseDate(fromNow: false)
version
}
rawBody
excerpt(pruneLength: 5000)
}
}
}
`,
path: '/api/agent-release-notes.json',
serialize: ({ data }) =>
data.allMdx.nodes
.map(({ frontmatter, rawBody }) => ({
.map(({ frontmatter, excerpt }) => ({
agent: getAgentName(frontmatter.subject),
date: frontmatter.releaseDate,
version: frontmatter.version,
description: cleanDescription(rawBody),
description: excerpt,
}))
.filter(({ date, agent }) => Boolean(date && agent)),
},
Expand Down
13 changes: 0 additions & 13 deletions src/utils/cleanDescription.js

This file was deleted.

0 comments on commit cd9bc22

Please sign in to comment.