diff --git a/src/@newrelic/gatsby-theme-newrelic/icons/newrelic.js b/src/@newrelic/gatsby-theme-newrelic/icons/newrelic.js index fdf641752..a5ec02bff 100644 --- a/src/@newrelic/gatsby-theme-newrelic/icons/newrelic.js +++ b/src/@newrelic/gatsby-theme-newrelic/icons/newrelic.js @@ -11,6 +11,7 @@ import relicans from './newrelic/relicans'; import share from './newrelic/share'; import nerdlog from './newrelic/nerdlog'; import checkShield from './newrelic/check-shield'; +import documentation from './newrelic/documentation'; export default { ...defaultIcons, @@ -26,4 +27,5 @@ export default { share, nerdlog, 'check-shield': checkShield, + documentation, }; diff --git a/src/@newrelic/gatsby-theme-newrelic/icons/newrelic/documentation.js b/src/@newrelic/gatsby-theme-newrelic/icons/newrelic/documentation.js new file mode 100644 index 000000000..3edd1d422 --- /dev/null +++ b/src/@newrelic/gatsby-theme-newrelic/icons/newrelic/documentation.js @@ -0,0 +1,23 @@ +import React from 'react'; +import SVG from '@newrelic/gatsby-theme-newrelic/src/components/SVG'; +import { css } from '@emotion/react'; + +const DocumentationIcon = () => ( + + + +); + +export default DocumentationIcon; diff --git a/src/components/quickstarts/QuickstartDataSources.js b/src/components/quickstarts/QuickstartDataSources.js new file mode 100644 index 000000000..266b8f29d --- /dev/null +++ b/src/components/quickstarts/QuickstartDataSources.js @@ -0,0 +1,77 @@ +import React from 'react'; +import { css } from '@emotion/react'; +import pluralize from 'pluralize'; +import { Surface, Link, Icon } from '@newrelic/gatsby-theme-newrelic'; +import Intro from '../Intro'; +import { quickstart } from '../../types'; + +const QuickstartDataSources = ({ quickstart }) => ( + <> + + {quickstart.name} observability quickstart contains{' '} + {pluralize('data source', quickstart.documentation?.length ?? 0, true)}. + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod + tempor incididunt ut labore et dolore magna aliqua. Aenean et tortor at + risus. Platea dictumst quisque sagittis purus sit amet volutpat consequat + mauris.{' '} + + +
+ {quickstart.documentation.map((doc, index) => ( + + +

+ + + {doc.name} + +

+ {doc.description &&

{doc.description}

} + +
+ ))} +
+ +); + +QuickstartDataSources.propTypes = { + quickstart: quickstart.isRequired, +}; + +export default QuickstartDataSources; diff --git a/src/templates/QuickstartDetails.js b/src/templates/QuickstartDetails.js index 8a03a7a8e..5ac766033 100644 --- a/src/templates/QuickstartDetails.js +++ b/src/templates/QuickstartDetails.js @@ -20,6 +20,7 @@ import { import ImageGallery from '../components/ImageGallery'; import InstallButton from '../components/InstallButton'; import Markdown from '../components/Markdown'; +import QuickstartDataSources from '../components/quickstarts/QuickstartDataSources'; import { quickstart } from '../types'; import { QUICKSTARTS_REPO, @@ -138,11 +139,15 @@ const ObservabilityPackDetails = ({ data, location }) => { )} - + {pack.documentation ? ( + + ) : ( + + )} @@ -250,6 +255,11 @@ export const pageQuery = graphql` url type } + documentation { + name + url + description + } authors } }