diff --git a/CHANGELOG.md b/CHANGELOG.md index 3386a9dbd..2051fd4d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## [1.35.6](https://github.com/newrelic/developer-website/compare/v1.35.5...v1.35.6) (2021-03-09) + + +### Bug Fixes + +* Swap guide linked for permissions ([2736ad8](https://github.com/newrelic/developer-website/commit/2736ad82b96af23ffa938b29332c5562695e843e)) +* Use correct path for set-up-dev-env guide link ([2f0ea56](https://github.com/newrelic/developer-website/commit/2f0ea5600e9bef3fbe738383abd5c1ce9c97d1d0)) + ## [1.35.5](https://github.com/newrelic/developer-website/compare/v1.35.4...v1.35.5) (2021-02-25) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6a79d90c3..f20c5edbc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -265,7 +265,7 @@ When a new guide is added or an existing guide path frontmatter slug is changed 1. Make your guide change and submit a PR. 2. Within that PR also make the navigation change. -3. In order to change navigation you will need to update the [sidenav.json](/src/data/sidenav.json) file. +3. In order to change navigation you will need to update the [nav.yml](/src/data/nav.yml) file. 4. Given the side navigation file is JSON, be sure to close all `[ ]` and `{ }` and use trailing `,` correctly. 5. Navigation `displayName` should always be sentence case. 6. Submit your PR and add the `navigation` label. @@ -410,5 +410,5 @@ as that will contain only 3rd party SDK documentation. ### Step 3: Add any new APIs or components to the navigation If there are new APIs or components, we will want to list them in the navigation -so that a user can easily discover them. [Add an entry to `sidenav.json`](https://github.com/newrelic/developer-website/blob/develop/src/data/sidenav.json) +so that a user can easily discover them. [Add an entry to `nav.yml`](https://github.com/newrelic/developer-website/blob/develop/src/data/nav.yml) to get the new API/component in the nav. diff --git a/gatsby-config.js b/gatsby-config.js index 8d06a96b2..13322bfc2 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -21,6 +21,13 @@ module.exports = { contentPadding: '2rem', maxWidth: '1700px', component: require.resolve('./src/layouts'), + mobileBreakpoint: '760px', + }, + // workaround until this is no longer needed. + // https://github.com/newrelic/gatsby-theme-newrelic/issues/302 + i18n: { + translationsPath: `${__dirname}/src/i18n/translations`, + additionalLocales: [], }, prism: { languages: ['yaml', 'sass', 'scss', 'java'], @@ -41,70 +48,57 @@ module.exports = { }, }, }, - swiftype: { - file: `${__dirname}/src/data/related-pages.json`, - refetch: Boolean(process.env.BUILD_RELATED_CONTENT), - engineKey: 'Ad9HfGjDw4GRkcmJjUut', - limit: 5, - getPath: ({ node }) => node.frontmatter.path, - getParams: ({ node }) => { - const { - tags, - title, - redirects = [], - resources = [], - } = node.frontmatter; - - const filteredUrls = resources - .map((resource) => resource.url) - .concat(redirects); + relatedResources: { + swiftype: { + resultsPath: `${__dirname}/src/data/related-pages.json`, + refetch: Boolean(process.env.BUILD_RELATED_CONTENT), + engineKey: 'Ad9HfGjDw4GRkcmJjUut', + limit: 5, + getSlug: ({ node }) => node.frontmatter.path, + getParams: ({ node }) => { + const { tags, title } = node.frontmatter; - return { - q: tags ? tags.map(quote).join(' OR ') : title, - search_fields: { - page: ['tags^10', 'body^5', 'title^1.5', '*'], - }, - filters: { - page: { - type: ['!blog', '!forum'], - url: filteredUrls.map((url) => - url.startsWith('/') - ? `!https://developer.newrelic.com${url}` - : `!${url}` - ), - document_type: [ - '!views_page_menu', - '!term_page_api_menu', - '!term_page_landing_page', - ], + return { + q: tags ? tags.map(quote).join(' OR ') : title, + search_fields: { + page: ['tags^10', 'body^5', 'title^1.5', '*'], }, - }, - }; + filters: { + page: { + type: ['!blog', '!forum'], + document_type: [ + '!views_page_menu', + '!term_page_api_menu', + '!term_page_landing_page', + ], + }, + }, + }; + }, + filter: ({ node }) => node.frontmatter.template === 'GuideTemplate', }, - filterNode: ({ node }) => - node.frontmatter.template === 'GuideTemplate', }, newrelic: { configs: { production: { instrumentationType: 'proAndSPA', - accountId: '10175106', + accountId: '10956800', trustKey: '1', - agentID: '22273498', - licenseKey: '23448da482', - applicationID: '22273498', - beacon: 'staging-bam.nr-data.net', - errorBeacon: 'staging-bam.nr-data.net', + agentID: '30712246', + licenseKey: 'NRJS-649173eb1a7b28cd6ab', + applicationID: '30712246', + beacon: 'staging-bam-cell.nr-data.net', + errorBeacon: 'staging-bam-cell.nr-data.net', }, staging: { instrumentationType: 'proAndSPA', - accountId: '10175106', + accountId: '10956800', trustKey: '1', - agentID: '22273531', - licenseKey: '23448da482', - applicationID: '22273531', - beacon: 'staging-bam.nr-data.net', - errorBeacon: 'staging-bam.nr-data.net', + agentID: '30712246', + licenseKey: 'NRJS-649173eb1a7b28cd6ab', + applicationID: '30712246', + beacon: 'staging-bam-cell.nr-data.net', + errorBeacon: 'staging-bam-cell.nr-data.net', }, }, }, diff --git a/gatsby-node.js b/gatsby-node.js index 8624fce4b..aed610cd4 100644 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -91,10 +91,6 @@ exports.createPages = async ({ actions, graphql, reporter }) => { frontmatter.template === 'OverviewTemplate' ? `${frontmatter.path}/*` : undefined, - relatedResourceLimit: Math.max( - MAX_RESULTS - (frontmatter.resources || []).length, - 0 - ), }, }); }); diff --git a/gatsby-ssr.js b/gatsby-ssr.js index 83bbf8c51..2cec2ee99 100644 --- a/gatsby-ssr.js +++ b/gatsby-ssr.js @@ -8,6 +8,7 @@ import React, { createContext } from 'react'; import wrapPageElement from './gatsby/wrap-page-element'; global.window = { + requestAnimationFrame: () => {}, __NR1_SDK__: { default: { PlatformStateContext: createContext(), diff --git a/gatsby/wrap-page-element.js b/gatsby/wrap-page-element.js index e3c2a9351..74634be17 100644 --- a/gatsby/wrap-page-element.js +++ b/gatsby/wrap-page-element.js @@ -1,15 +1,8 @@ -/* eslint-disable react/prop-types */ import React from 'react'; -import { BreadcrumbContext } from '../src/components/BreadcrumbContext'; import { PageContext } from '../src/components/PageContext'; import { Global, css } from '@emotion/core'; -import createBreadcrumbs from '../src/utils/create-breadcrumbs'; -import pages from '../src/data/sidenav.json'; - const wrapPageElement = ({ element, props }) => { - const crumbs = createBreadcrumbs(props.path ?? '/404', pages); - return ( <> { `} /> - - {element} - + {element} ); diff --git a/package.json b/package.json index ed7355b6a..fa3d906de 100644 --- a/package.json +++ b/package.json @@ -1,19 +1,19 @@ { "name": "developer-website", "private": true, - "version": "1.35.5", + "version": "1.35.6", "dependencies": { "@emotion/core": "^10.1.1", "@emotion/styled": "^10.0.27", "@mdx-js/mdx": "^1.6.19", "@mdx-js/react": "^1.6.19", - "@newrelic/gatsby-theme-newrelic": "^1.25.0", + "@newrelic/gatsby-theme-newrelic": "^1.35.1", "@splitsoftware/splitio-react": "^1.2.0", "@xstate/react": "^1.0.2", "classnames": "^2.2.6", "date-fns": "^2.16.1", "diff": "^4.0.2", - "gatsby": "^2.30.2", + "gatsby": "^2.32.9", "gatsby-image": "^2.4.20", "gatsby-plugin-emotion": "^4.3.14", "gatsby-plugin-manifest": "^2.4.35", @@ -37,8 +37,8 @@ "prism-react-renderer": "^1.1.1", "prismjs": "^1.21.0", "prop-types": "^15.7.2", - "react": "^16.12.0", - "react-dom": "^16.12.0", + "react": "^17.0.1", + "react-dom": "^17.0.1", "react-helmet": "^6.1.0", "react-live": "^2.2.2", "react-markdown": "^5.0.3", @@ -59,7 +59,7 @@ "@semantic-release/git": "^9.0.0", "@testing-library/react": "^10.0.4", "babel-jest": "^26.0.1", - "babel-preset-gatsby": "^0.11.0", + "babel-preset-gatsby": "^1.0.0", "core-js": "^2.4.0", "eslint": "^7.11.0", "eslint-plugin-jsx-a11y": "^6.3.1", diff --git a/src/@newrelic/gatsby-theme-newrelic/icons/newrelic.js b/src/@newrelic/gatsby-theme-newrelic/icons/newrelic.js new file mode 100644 index 000000000..27efc0999 --- /dev/null +++ b/src/@newrelic/gatsby-theme-newrelic/icons/newrelic.js @@ -0,0 +1,25 @@ +import defaultIcons from '@newrelic/gatsby-theme-newrelic/src/icons/newrelic'; +import automation from './newrelic/automation'; +import book from './newrelic/book'; +import buildApps from './newrelic/build-apps'; +import builders from './newrelic/builders'; +import nerdBytes from './newrelic/nerd-bytes'; +import developerChampions from './newrelic/developer-champions'; +import event from './newrelic/event'; +import podcasts from './newrelic/podcasts'; +import relicans from './newrelic/relicans'; +import share from './newrelic/share'; + +export default { + ...defaultIcons, + automation, + book, + 'build-apps': buildApps, + builders, + 'nerd-bytes': nerdBytes, + 'developer-champions': developerChampions, + event, + relicans, + podcasts, + share, +}; diff --git a/src/@newrelic/gatsby-theme-newrelic/icons/newrelic/automation.js b/src/@newrelic/gatsby-theme-newrelic/icons/newrelic/automation.js new file mode 100644 index 000000000..d3c0cc104 --- /dev/null +++ b/src/@newrelic/gatsby-theme-newrelic/icons/newrelic/automation.js @@ -0,0 +1,25 @@ +import React from 'react'; +import NewRelicSVG from '../../../../components/NewRelicSVG'; + +const AutomationIcon = (props) => ( + + + + + + + + + + +); + +export default AutomationIcon; diff --git a/src/@newrelic/gatsby-theme-newrelic/icons/newrelic/book.js b/src/@newrelic/gatsby-theme-newrelic/icons/newrelic/book.js new file mode 100644 index 000000000..585265eb7 --- /dev/null +++ b/src/@newrelic/gatsby-theme-newrelic/icons/newrelic/book.js @@ -0,0 +1,15 @@ +import React from 'react'; +import NewRelicSVG from '../../../../components/NewRelicSVG'; + +const BookIcon = (props) => ( + + + + + +); + +export default BookIcon; diff --git a/src/@newrelic/gatsby-theme-newrelic/icons/newrelic/build-apps.js b/src/@newrelic/gatsby-theme-newrelic/icons/newrelic/build-apps.js new file mode 100644 index 000000000..db67ba208 --- /dev/null +++ b/src/@newrelic/gatsby-theme-newrelic/icons/newrelic/build-apps.js @@ -0,0 +1,13 @@ +import React from 'react'; +import NewRelicSVG from '../../../../components/NewRelicSVG'; + +const BuildAppsIcon = (props) => ( + + + + + + +); + +export default BuildAppsIcon; diff --git a/src/@newrelic/gatsby-theme-newrelic/icons/newrelic/builders.js b/src/@newrelic/gatsby-theme-newrelic/icons/newrelic/builders.js new file mode 100644 index 000000000..70c514529 --- /dev/null +++ b/src/@newrelic/gatsby-theme-newrelic/icons/newrelic/builders.js @@ -0,0 +1,10 @@ +import React from 'react'; +import NewRelicSVG from '../../../../components/NewRelicSVG'; + +const BuildersIcon = (props) => ( + + + +); + +export default BuildersIcon; diff --git a/src/@newrelic/gatsby-theme-newrelic/icons/newrelic/developer-champions.js b/src/@newrelic/gatsby-theme-newrelic/icons/newrelic/developer-champions.js new file mode 100644 index 000000000..219bdbd55 --- /dev/null +++ b/src/@newrelic/gatsby-theme-newrelic/icons/newrelic/developer-champions.js @@ -0,0 +1,18 @@ +import React from 'react'; +import NewRelicSVG from '../../../../components/NewRelicSVG'; + +const DeveloperChampionsIcon = (props) => ( + + + + + + + + + + + +); + +export default DeveloperChampionsIcon; diff --git a/src/@newrelic/gatsby-theme-newrelic/icons/newrelic/event.js b/src/@newrelic/gatsby-theme-newrelic/icons/newrelic/event.js new file mode 100644 index 000000000..7ba1af7ed --- /dev/null +++ b/src/@newrelic/gatsby-theme-newrelic/icons/newrelic/event.js @@ -0,0 +1,10 @@ +import React from 'react'; +import NewRelicSVG from '../../../../components/NewRelicSVG'; + +const EventIcon = (props) => ( + + + +); + +export default EventIcon; diff --git a/src/@newrelic/gatsby-theme-newrelic/icons/newrelic/nerd-bytes.js b/src/@newrelic/gatsby-theme-newrelic/icons/newrelic/nerd-bytes.js new file mode 100644 index 000000000..6d96d17ab --- /dev/null +++ b/src/@newrelic/gatsby-theme-newrelic/icons/newrelic/nerd-bytes.js @@ -0,0 +1,19 @@ +import React from 'react'; +import NewRelicSVG from '../../../../components/NewRelicSVG'; + +const nerdBytesIcon = (props) => ( + + <> + + + + + + + + + + +); + +export default nerdBytesIcon; diff --git a/src/@newrelic/gatsby-theme-newrelic/icons/newrelic/podcasts.js b/src/@newrelic/gatsby-theme-newrelic/icons/newrelic/podcasts.js new file mode 100644 index 000000000..b1cb5f690 --- /dev/null +++ b/src/@newrelic/gatsby-theme-newrelic/icons/newrelic/podcasts.js @@ -0,0 +1,14 @@ +import React from 'react'; +import NewRelicSVG from '../../../../components/NewRelicSVG'; + +const PodcastsIcon = (props) => ( + + + + + + + +); + +export default PodcastsIcon; diff --git a/src/@newrelic/gatsby-theme-newrelic/icons/newrelic/relicans.js b/src/@newrelic/gatsby-theme-newrelic/icons/newrelic/relicans.js new file mode 100644 index 000000000..56a212a6f --- /dev/null +++ b/src/@newrelic/gatsby-theme-newrelic/icons/newrelic/relicans.js @@ -0,0 +1,10 @@ +import React from 'react'; +import NewRelicSVG from '../../../../components/NewRelicSVG'; + +const RelicansIcon = (props) => ( + + + +); + +export default RelicansIcon; diff --git a/src/@newrelic/gatsby-theme-newrelic/icons/newrelic/share.js b/src/@newrelic/gatsby-theme-newrelic/icons/newrelic/share.js new file mode 100644 index 000000000..cc383e191 --- /dev/null +++ b/src/@newrelic/gatsby-theme-newrelic/icons/newrelic/share.js @@ -0,0 +1,14 @@ +import React from 'react'; +import NewRelicSVG from '../../../../components/NewRelicSVG'; + +const ShareIcon = (props) => ( + + + + + + + +); + +export default ShareIcon; diff --git a/src/components/BreadcrumbBar.js b/src/components/BreadcrumbBar.js deleted file mode 100644 index 65f43df95..000000000 --- a/src/components/BreadcrumbBar.js +++ /dev/null @@ -1,29 +0,0 @@ -import React from 'react'; -import { Link } from 'gatsby'; -import styles from './BreadcrumbBar.module.scss'; -import PropTypes from 'prop-types'; -import { link } from '../types'; - -const BreadcrumbBar = ({ crumbs, duration }) => ( -
- - {duration &&
{duration}
} -
-); - -BreadcrumbBar.propTypes = { - crumbs: PropTypes.arrayOf(link), - duration: PropTypes.string, -}; - -export default BreadcrumbBar; diff --git a/src/components/BreadcrumbBar.module.scss b/src/components/BreadcrumbBar.module.scss deleted file mode 100644 index 04a696b72..000000000 --- a/src/components/BreadcrumbBar.module.scss +++ /dev/null @@ -1,40 +0,0 @@ -.breadcrumbBar { - padding: 1rem 0; - font-size: 0.9rem; - width: 100%; -} - -.container { - display: flex; - justify-content: space-between; - align-items: center; -} - -.crumbs { - display: flex; - list-style: none; - margin: 0; - padding: 0; - - a, - span { - color: var(--color-black); - text-decoration: none; - } - - li:last-child > span { - font-weight: 600; - } - - li:not(:last-child):after { - content: ''; - display: inline-block; - width: 0.9rem; - height: 0.9rem; - margin: 0 1rem; - vertical-align: middle; - background-image: url('../images/chevron-right.svg'); - background-repeat: no-repeat; - background-position: center center; - } -} diff --git a/src/components/BreadcrumbContext.js b/src/components/BreadcrumbContext.js deleted file mode 100644 index 936ae93ae..000000000 --- a/src/components/BreadcrumbContext.js +++ /dev/null @@ -1,3 +0,0 @@ -import React from 'react'; - -export const BreadcrumbContext = React.createContext([]); diff --git a/src/components/MobileHeader.js b/src/components/MobileHeader.js deleted file mode 100644 index fbf9c6737..000000000 --- a/src/components/MobileHeader.js +++ /dev/null @@ -1,77 +0,0 @@ -import React, { useState } from 'react'; -import PropTypes from 'prop-types'; -import { css } from '@emotion/core'; -import { Link } from 'gatsby'; -import Navigation from './Navigation'; -import { - Logo, - HamburgerMenu, - SearchInput, -} from '@newrelic/gatsby-theme-newrelic'; - -const MobileHeader = ({ className, isOpen, toggle }) => { - const [searchTerm, setSearchTerm] = useState(''); - - return ( -
-
- - - - - -
- - {isOpen && ( - <> - setSearchTerm('')} - onChange={(e) => setSearchTerm(e.target.value)} - value={searchTerm} - /> - - - )} -
- ); -}; - -MobileHeader.propTypes = { - className: PropTypes.string, - isOpen: PropTypes.bool.isRequired, - toggle: PropTypes.func.isRequired, -}; - -export default MobileHeader; diff --git a/src/components/Navigation.js b/src/components/Navigation.js deleted file mode 100644 index f320092fc..000000000 --- a/src/components/Navigation.js +++ /dev/null @@ -1,64 +0,0 @@ -import React from 'react'; -import PropTypes from 'prop-types'; -import cx from 'classnames'; -import NavigationItems from './NavigationItems'; -import pages from '../data/sidenav.json'; -import matchSearchString from '../utils/matchSearchString'; -import styles from './Navigation.module.scss'; - -const filterPageNames = (pages, searchTerm, parent = []) => { - return [ - ...new Set( - pages.flatMap((page) => { - if (page.children) { - return filterPageNames(page.children, searchTerm, [ - ...parent, - page.displayName, - ]); - } else if (matchSearchString(page.displayName, searchTerm)) { - return [...parent, page.displayName]; - } else if (parent.some((el) => matchSearchString(el, searchTerm))) { - return [...parent]; - } - - return null; - }) - ), - ].filter(Boolean); -}; - -const Navigation = ({ className, searchTerm }) => { - const searchTermSanitized = searchTerm?.replace( - /[.*+?^${}()|[\]\\]/g, - '\\$&' - ); - - const filteredPageNames = searchTerm - ? filterPageNames(pages, searchTermSanitized) - : undefined; - - if (filteredPageNames?.length === 0) { - return
No results found
; - } - - return ( - - ); -}; - -Navigation.propTypes = { - className: PropTypes.string, - searchTerm: PropTypes.string, -}; - -export default Navigation; diff --git a/src/components/Navigation.module.scss b/src/components/Navigation.module.scss deleted file mode 100644 index 025eb98eb..000000000 --- a/src/components/Navigation.module.scss +++ /dev/null @@ -1,9 +0,0 @@ -.container { - font-size: 0.875rem; -} - -.emptyResults { - font-size: 0.875rem; - padding-top: 1rem; - font-style: italic; -} diff --git a/src/components/NavigationItems.js b/src/components/NavigationItems.js deleted file mode 100644 index b050d5b86..000000000 --- a/src/components/NavigationItems.js +++ /dev/null @@ -1,246 +0,0 @@ -import React, { Fragment, useState, useContext, useEffect } from 'react'; -import { css } from '@emotion/core'; -import usePrevious from '../hooks/usePrevious'; -import PropTypes from 'prop-types'; -import FeatherIcon from './FeatherIcon'; -import NewRelicIcon from './NewRelicIcon'; -import { Link } from 'gatsby'; -import cx from 'classnames'; -import { BreadcrumbContext } from './BreadcrumbContext'; -import styles from './NavigationItems.module.scss'; -import { link } from '../types'; -import { useLocation, useMatch } from '@reach/router'; -import { Icon } from '@newrelic/gatsby-theme-newrelic'; - -const iconLibrary = { - 'Collect data': 'collectData', - 'Build apps': 'buildApps', - 'Automate workflows': 'automation', - 'Explore docs': 'developerDocs', - 'Developer events': 'event', - 'Developer champions': 'developerChampions', - 'The Relicans': 'theRelicans', - 'New Relic Builders': 'builders', - Podcasts: 'podcasts', - 'Try our APIs': 'tryOurAPIs', - 'Nerd Bytes': 'nerdBytes', -}; - -const getHighlightedText = (text, highlight) => { - const parts = text.split(new RegExp(`(${highlight})`, 'gi')); - return ( - - {parts.map((part) => - part.toLowerCase() === highlight.toLowerCase() ? {part} : part - )} - - ); -}; - -const isExternal = (url) => url.slice(0, 4) === 'http'; - -const NavigationItems = ({ - pages, - filteredPageNames, - searchTerm, - depthLevel = 0, -}) => { - const groupedPages = pages.reduce((groups, page) => { - const { group = '' } = page; - - return { - ...groups, - [group]: [...(groups[group] || []), page], - }; - }, {}); - - return Object.entries(groupedPages).map(([group, pages]) => { - const showGroup = - (group && !filteredPageNames) || - (group && - filteredPageNames && - pages.some((el) => filteredPageNames.includes(el.displayName))); - - return ( - - {showGroup && ( -
  • {group}
  • - )} - {pages.map((page, index) => - filteredPageNames?.includes(page.displayName) || - !filteredPageNames ? ( - - ) : null - )} -
    - ); - }); -}; - -const NavIcon = ({ page }) => { - if (page.displayName === 'Collect data') { - return ( - - ); - } - - if (iconLibrary[page.displayName]) { - return ( - - ); - } - - return null; -}; - -const NavItem = ({ page, depthLevel, searchTerm, filteredPageNames }) => { - const location = useLocation(); - const crumbs = useContext(BreadcrumbContext).flatMap((x) => x.displayName); - const isBreadCrumb = crumbs.includes(page.displayName); - const matchesSearch = filteredPageNames?.includes(page.displayName); - const hasChangedPage = location.pathname !== usePrevious(location.pathname); - const [toggleIsExpanded, setToggleIsExpanded] = useState(isBreadCrumb); - const isExpanded = toggleIsExpanded || matchesSearch; - - useEffect(() => { - if (hasChangedPage) { - setToggleIsExpanded(isBreadCrumb); - } - }, [hasChangedPage, isBreadCrumb]); - - const isCurrentPage = Boolean(useMatch(page.url || '/')); - - const isToggleable = [ - 'Component library', - 'Explore docs', - 'Try our APIs', - 'New Relic One CLI', - ].includes(page.displayName); - const headerIcon = depthLevel === 0 && ; - const display = filteredPageNames - ? getHighlightedText(page.displayName, searchTerm) - : page.displayName; - - return ( - <> -
    - {page.url ? ( - setToggleIsExpanded(!toggleIsExpanded) - : null - } - className={cx(styles.navLink, { - [styles.isCurrentPage]: isCurrentPage, - })} - to={page.url} - > - - {headerIcon} - {display} - - {page.children && ( - - )} - {isExternal(page.url) && } - - ) : ( -
    setToggleIsExpanded(!toggleIsExpanded)} - onKeyPress={() => setToggleIsExpanded(!toggleIsExpanded)} - tabIndex={0} - > - - {headerIcon} - {display} - - -
    - )} - - {page.children && isExpanded && ( - - )} -
    - - ); -}; - -NavIcon.propTypes = { - page: PropTypes.shape({ - displayName: PropTypes.string.isRequired, - }), -}; - -NavigationItems.propTypes = { - pages: PropTypes.array.isRequired, - filteredPageNames: PropTypes.array, - searchTerm: PropTypes.string, - depthLevel: PropTypes.number, -}; - -NavItem.propTypes = { - page: link, - filteredPageNames: PropTypes.array, - searchTerm: PropTypes.string, - depthLevel: PropTypes.number.isRequired, -}; - -export default NavigationItems; diff --git a/src/components/NavigationItems.module.scss b/src/components/NavigationItems.module.scss deleted file mode 100644 index d47d8040f..000000000 --- a/src/components/NavigationItems.module.scss +++ /dev/null @@ -1,87 +0,0 @@ -.navLink { - color: var(--primary-text-color); - display: flex; - align-items: center; - justify-content: space-between; - text-decoration: none; - transition: 0.2s ease-out; - padding: 0.5rem; - margin: 0 -0.5rem; - margin-left: calc((0.5rem + var(--icon-size)) * -1); - border-radius: 0.25rem; - padding-left: calc(0.5rem + var(--icon-size)); - - &:hover { - color: var(--primary-text-hover-color); - } - - [data-depth='0'] > & { - padding-left: 0.5rem; - margin-left: -0.5rem; - font-weight: bold; - } -} - -.headerIcon { - margin-right: 0.5rem; -} - -button.navLink { - color: var(--primary-text-color); - background: inherit; - border: none; - font-size: inherit; - font-weight: inherit; - - &:focus { - outline: none; - } -} - -.navLinkText { - display: flex; - align-items: center; -} - -.currentPageIndicator { - stroke-width: 4; - - @media (max-width: 760px) { - display: none; - } -} - -.nestedChevron { - stroke-width: 2; - transition: 0.2s; - - &.isExpanded { - transform: rotate(90deg); - } -} - -.groupName { - color: var(--secondary-text-color); - font-weight: bold; - font-size: 0.75rem; - text-transform: uppercase; - - &:not(:first-child) { - margin-top: 2rem; - } -} - -.isCurrentPage { - background: var(--color-neutrals-100); - - :global(.dark-mode) & { - color: var(--primary-text-hover-color); - background: var(--color-dark-100); - } -} - -.filterOn { - .groupName { - margin-top: 0.5rem; - } -} diff --git a/src/components/NewRelicIcon.js b/src/components/NewRelicIcon.js deleted file mode 100644 index 6731796d3..000000000 --- a/src/components/NewRelicIcon.js +++ /dev/null @@ -1,130 +0,0 @@ -import React from 'react'; -import PropTypes from 'prop-types'; -import cx from 'classnames'; -import styles from './NewRelicIcon.module.scss'; - -const NewRelicIcon = ({ className, name, size = '1em' }) => { - const paths = NEWRELIC_ICONS[name]; - - return paths ? ( - - {paths} - - ) : null; -}; - -const NEWRELIC_ICONS = { - automation: ( - <> - - - - - - - - - - ), - buildApps: ( - <> - - - - - - ), - collectData: ( - <> - - - - - ), - tryOurAPIs: ( - <> - - - - - - - ), - developerDocs: ( - <> - - - - - ), - developerChampions: ( - <> - - - - - - - - - - - ), - theRelicans: ( - - ), - podcasts: ( - <> - - - - - - - ), - builders: ( - - ), - nerdBytes: ( - <> - - - - - - - - - - ), - event: ( - <> - - - ), -}; - -NewRelicIcon.propTypes = { - className: PropTypes.string, - name: PropTypes.oneOf(Object.keys(NEWRELIC_ICONS)).isRequired, - size: PropTypes.string, -}; - -export default NewRelicIcon; diff --git a/src/components/NewRelicIcon.module.scss b/src/components/NewRelicIcon.module.scss deleted file mode 100644 index 6c6f7e56f..000000000 --- a/src/components/NewRelicIcon.module.scss +++ /dev/null @@ -1,7 +0,0 @@ -.icon { - fill: none; - stroke: currentColor; - stroke-width: 1.5; - stroke-linecap: round; - stroke-linejoin: round; -} diff --git a/src/components/NewRelicSVG.js b/src/components/NewRelicSVG.js new file mode 100644 index 000000000..2caa20585 --- /dev/null +++ b/src/components/NewRelicSVG.js @@ -0,0 +1,23 @@ +import React from 'react'; +import { css } from '@emotion/core'; +import SVG from '@newrelic/gatsby-theme-newrelic/src/components/SVG'; + +const NewRelicSVG = (props) => ( + +); + +NewRelicSVG.defaultProps = { + size: '1em', +}; + +export default NewRelicSVG; diff --git a/src/components/__tests__/BreadcrumbBar.js b/src/components/__tests__/BreadcrumbBar.js deleted file mode 100644 index 2ad2f0370..000000000 --- a/src/components/__tests__/BreadcrumbBar.js +++ /dev/null @@ -1,38 +0,0 @@ -import React from 'react'; -import { render } from '@testing-library/react'; - -import BreadcrumbBar from '../BreadcrumbBar'; - -const crumbs = [ - { displayName: 'Food', url: '/food' }, - { displayName: 'Mexican' }, - { displayName: 'Tacos' }, -]; - -describe('BreadcrumbBar', () => { - it('renders a list of breadcrumbs', () => { - const { getByText } = render(); - const crumb1 = getByText('Food'); - const crumb2 = getByText('Mexican'); - const crumb3 = getByText('Tacos'); - - expect(crumb1).toBeTruthy(); - expect(crumb2).toBeTruthy(); - expect(crumb3).toBeTruthy(); - }); - - it('render crumbs with urls as links', () => { - const { getByText } = render(); - const crumb1 = getByText('Food'); - const expected = `${window.location.href}food`; - - expect(crumb1.href).toEqual(expected); - }); - - it('render crumbs without urls as spans', () => { - const { getByText } = render(); - const crumb2 = getByText('Mexican'); - - expect(crumb2.href).toBeFalsy(); - }); -}); diff --git a/src/data/nav.yml b/src/data/nav.yml new file mode 100644 index 000000000..8d8387e94 --- /dev/null +++ b/src/data/nav.yml @@ -0,0 +1,351 @@ +- title: Collect data + icon: nr-tdp + url: '/collect-data' + pages: + - title: Collect data from any source + url: '/collect-data/collect-data-from-any-source' + - title: Create custom attributes + url: '/collect-data/custom-attributes' + - title: Create custom New Relic events + url: '/collect-data/custom-events' + - title: Query data with NRQL + url: '/collect-data/query-data-nrql' + - title: Explore NerdGraph using the API Explorer + url: '/collect-data/get-started-nerdgraph-api-explorer' +- title: Automate workflows + icon: nr-automation + url: '/automate-workflows' + pages: + - title: Using Terrafom with New Relic + url: '/terraform' + pages: + - title: Set up New Relic using Terraform + url: '/automate-workflows/get-started-terraform' + - title: Using Terraform modules and remote storage + url: '/terraform/terraform-modules' + - title: Using Terragrunt to manage multiple environments + url: '/terraform/terragrunt-configuration' + - title: Get started with the New Relic CLI + url: '/automate-workflows/get-started-new-relic-cli' + - title: Set up New Relic using the Kubernetes operator + url: '/automate-workflows/get-started-kubernetes' + - title: Set up New Relic using Helm charts + url: '/automate-workflows/kubernetes-helm-deployment' + - title: Tag a set of resources efficiently + url: '/automate-workflows/5-mins-tag-resources' + - title: Automated end-to-end tagging of entities + url: '/automate-workflows/automated-tagging' + - title: Use New Relic to diagnose problems in your system + url: '/automate-workflows/diagnose-problems' + pages: + - title: High response times + url: '/automate-workflows/diagnose-problems/high-response-times' + - title: Error alerts + url: '/automate-workflows/diagnose-problems/error-alerts' +- title: Build apps + icon: nr-build-apps + url: '/build-apps' + pages: + - title: Set up your development environment + url: '/build-apps/set-up-dev-env' + - title: Create a 'Hello, World!' app + url: '/build-apps/build-hello-world-app' + - title: Publish and deploy your app + url: '/build-apps/publish-deploy' + - title: Permissions for managing apps + url: '/build-apps/permission-manage-apps' + - title: Map pageviews by region + url: '/build-apps/map-pageviews-by-region' + - title: Add a time picker + url: '/build-apps/add-time-picker-guide' + - title: Add the NerdGraphQuery component to an app + url: '/build-apps/add-nerdgraphquery-guide' + - title: Add tables to your New Relic One application + url: '/build-apps/howto-use-nrone-table-components' + - title: Add, query, and mutate data using NerdStorage + url: '/build-apps/add-query-mutate-data-nerdstorage' + - title: See all open source apps + url: https://opensource.newrelic.com/nerdpacks/ + - title: Build custom visualizations for dashboards + url: '/build-apps/build-visualization' +- title: Try our APIs + icon: nr-share + url: '/try-our-apis' + pages: + - title: Telemetry APIs + pages: + - title: Metrics API + url: https://docs.newrelic.com/docs/telemetry-data-platform/get-data/apis/introduction-metric-api + - title: Event API + url: https://docs.newrelic.com/docs/telemetry-data-platform/ingest-manage-data/ingest-apis/use-event-api-report-custom-events + - title: Log API + url: https://docs.newrelic.com/docs/logs/log-management/log-api/introduction-log-api + - title: Trace API + url: https://docs.newrelic.com/docs/understand-dependencies/distributed-tracing/trace-api/introduction-trace-api + - title: REST & GraphQL APIs + pages: + - title: NerdGraph API Explorer + url: https://api.newrelic.com/graphiql + - title: REST API Explorer + url: https://rpm.newrelic.com/api/explore + - title: Insights API + url: https://docs.newrelic.com/docs/insights/insights-api/get-data/query-insights-event-data-api + - title: Synthetics API + url: https://docs.newrelic.com/docs/apis/synthetics-rest-api +- title: Explore docs + icon: nr-book + pages: + - title: New Relic One CLI + url: '/explore-docs/nr1-cli' + pages: + - title: Common commands + url: '/explore-docs/nr1-common' + - title: Config commands + url: '/explore-docs/nr1-config' + - title: Nerdpack commands + url: '/explore-docs/nr1-nerdpack' + - title: Subscription commands + url: '/explore-docs/nr1-subscription' + - title: Plugin commands + url: '/explore-docs/nr1-plugins' + - title: Catalog commands + url: '/explore-docs/nr1-catalog' + - title: New Relic CLI + url: '/explore-docs/newrelic-cli' + - title: Nerdpack file structure + url: '/explore-docs/nerdpack-file-structure' + - title: Intro to Nerdstorage + url: '/explore-docs/nerdstorage' + - title: Intro to NerdstorageVault + url: '/explore-docs/nerdstoragevault' + - title: Query and store data + url: '/explore-docs/query-and-store-data' + - title: New Relic One SDK Component library + url: '/explore-docs/intro-to-sdk' + pages: + - title: Controls + pages: + - title: AccountPicker + url: '/components/account-picker' + - title: Button + url: '/components/button' + - title: Checkbox + url: '/components/checkbox' + - title: Dropdown + url: '/components/dropdown' + - title: DropdownItem + url: '/components/dropdown-item' + - title: DropdownSection + url: '/components/dropdown-section' + - title: MultilineTextField + url: '/components/multiline-text-field' + - title: Radio + url: '/components/radio' + - title: RadioGroup + url: '/components/radio-group' + - title: SegmentedControl + url: '/components/segmented-control' + - title: SegmentedControlItem + url: '/components/segmented-control-item' + - title: Select + url: '/components/select' + - title: SelectItem + url: '/components/select-item' + - title: Switch + url: '/components/switch' + - title: TextField + url: '/components/text-field' + - title: Tables + pages: + - title: Table + url: '/components/table' + - title: TableHeader + url: '/components/table-header' + - title: TableHeaderCell + url: '/components/table-header-cell' + - title: TableRow + url: '/components/table-row' + - title: TableRowCell + url: '/components/table-row-cell' + - title: EntityTitleTableRowCell + url: '/components/entity-title-table-row-cell' + - title: FavoriteTableRowCell + url: '/components/favorite-table-row-cell' + - title: MetricTableRowCell + url: '/components/metric-table-row-cell' + - title: SparklineTableRowCell + url: '/components/sparkline-table-row-cell' + - title: UserTableRowCell + url: '/components/user-table-row-cell' + - title: Feedback + pages: + - title: Icon + url: '/components/icon' + - title: Spinner + url: '/components/spinner' + - title: Toast + url: '/components/toast' + - title: Indicators + pages: + - title: Badge + url: '/components/badge' + - title: Overlays + pages: + - title: Modal + url: '/components/modal' + - title: Popover + url: '/components/popover' + - title: PopoverBody + url: '/components/popover-body' + - title: PopoverTrigger + url: '/components/popover-trigger' + - title: Tooltip + url: '/components/tooltip' + - title: Structure + pages: + - title: AutoSizer + url: '/components/auto-sizer' + - title: Card + url: '/components/card' + - title: CardBody + url: '/components/card-body' + - title: CardHeader + url: '/components/card-header' + - title: Grid + url: '/components/grid' + - title: GridItem + url: '/components/grid-item' + - title: Layout + url: '/components/layout' + - title: LayoutItem + url: '/components/layout-item' + - title: List + url: '/components/list' + - title: ListItem + url: '/components/list-item' + - title: Spacing + url: '/components/spacing' + - title: Stack + url: '/components/stack' + - title: StackItem + url: '/components/stack-item' + - title: Tabs + url: '/components/tabs' + - title: TabsItem + url: '/components/tabs-item' + - title: Text + pages: + - title: BlockText + url: '/components/block-text' + - title: HeadingText + url: '/components/heading-text' + - title: Link + url: '/components/link' + - title: Charts + url: '/components/charts' + pages: + - title: AreaChart + url: '/components/area-chart' + - title: BarChart + url: '/components/bar-chart' + - title: BillboardChart + url: '/components/billboard-chart' + - title: ChartGroup + url: '/components/chart-group' + - title: FunnelChart + url: '/components/funnel-chart' + - title: HeatmapChart + url: '/components/heatmap-chart' + - title: HistogramChart + url: '/components/histogram-chart' + - title: JsonChart + url: '/components/json-chart' + - title: LineChart + url: '/components/line-chart' + - title: PieChart + url: '/components/pie-chart' + - title: ScatterChart + url: '/components/scatter-chart' + - title: SparklineChart + url: '/components/sparkline-chart' + - title: StackedBarChart + url: '/components/stacked-bar-chart' + - title: TableChart + url: '/components/table-chart' + - title: Query and storage + pages: + - title: AccountStorageMutation + url: '/components/account-storage-mutation' + - title: AccountStorageQuery + url: '/components/account-storage-query' + - title: AccountsQuery + url: '/components/accounts-query' + - title: EntitiesByDomainTypeQuery + url: '/components/entities-by-domain-type-query' + - title: EntitiesByGuidsQuery + url: '/components/entities-by-guids-query' + - title: EntitiesByNameQuery + url: '/components/entities-by-name-query' + - title: EntityByGuidQuery + url: '/components/entity-by-guid-query' + - title: EntityCountQuery + url: '/components/entity-count-query' + - title: EntitySearchQuery + url: '/components/entity-search-query' + - title: EntityStorageMutation + url: '/components/entity-storage-mutation' + - title: EntityStorageQuery + url: '/components/entity-storage-query' + - title: NerdGraphMutation + url: '/components/nerd-graph-mutation' + - title: NerdGraphQuery + url: '/components/nerd-graph-query' + - title: NrqlQuery + url: '/components/nrql-query' + - title: UserQuery + url: '/components/user-query' + - title: UserStorageMutation + url: '/components/user-storage-mutation' + - title: UserStorageQuery + url: '/components/user-storage-query' + - title: Platform APIs + pages: + - title: NerdletStateContext + url: '/components/nerdlet-state-context' + - title: PlatformStateContext + url: '/components/platform-state-context' + - title: logger + url: '/apis/logger' + - title: navigation + url: '/apis/navigation' + - title: nerdlet + url: '/apis/nerdlet' + - title: ngql + url: '/apis/ngql' +- title: Developer events + icon: nr-event + url: '/developer-events' + pages: + - title: Past events + pages: + - title: Kubecon & CloudNativeCon + url: '/kubecon-europe-2020' + - title: Nerd days 1.0 + url: '/nerd-days' + - title: All things open + url: '/all-things-open' +- title: Nerd Bytes + icon: nr-nerd-bytes + url: '/nerd-bytes' +- title: The Relicans + icon: nr-relicans + url: '/relicans' +- title: Developer champions + icon: nr-developer-champions + url: '/developer-champion' +- title: New Relic Builders + icon: nr-builders + url: '/builders' +- title: Podcasts + icon: nr-podcasts + url: '/podcasts' diff --git a/src/data/relicansData.js b/src/data/relicansData.js index d5f8f39f1..f207ea086 100644 --- a/src/data/relicansData.js +++ b/src/data/relicansData.js @@ -112,7 +112,7 @@ export const teamMembers = [ }, { name: 'linkedin', - url: 'https://linkedin.com/in/alifinkelsteina', + url: 'https://linkedin.com/in/alifinkelstein', }, ], }, diff --git a/src/data/sidenav.json b/src/data/sidenav.json deleted file mode 100644 index 5cd4e5981..000000000 --- a/src/data/sidenav.json +++ /dev/null @@ -1,695 +0,0 @@ -[ - { - "displayName": "Collect data", - "url": "/collect-data", - "children": [ - { - "displayName": "Collect data from any source", - "url": "/collect-data/collect-data-from-any-source" - }, - { - "displayName": "Create custom attributes", - "url": "/collect-data/custom-attributes" - }, - { - "displayName": "Create custom New Relic events", - "url": "/collect-data/custom-events" - }, - { - "displayName": "Query data with NRQL", - "url": "/collect-data/query-data-nrql" - }, - { - "displayName": "Explore NerdGraph using the API Explorer", - "url": "/collect-data/get-started-nerdgraph-api-explorer" - } - ] - }, - { - "displayName": "Automate workflows", - "url": "/automate-workflows", - "children": [ - { - "displayName": "Using Terrafom with New Relic", - "url": "/terraform", - "children":[ - { - "displayName": "Set up New Relic using Terraform", - "url": "/automate-workflows/get-started-terraform" - }, - { - "displayName": "Using Terraform modules and remote storage", - "url": "/terraform/terraform-modules" - }, - { - "displayName": "Using Terragrunt to manage multiple environments", - "url": "/terraform/terragrunt-configuration" - } - ] - }, - { - "displayName": "Get started with the New Relic CLI", - "url": "/automate-workflows/get-started-new-relic-cli" - }, - { - "displayName": "Set up New Relic using the Kubernetes operator", - "url": "/automate-workflows/get-started-kubernetes" - }, - { - "displayName": "Set up New Relic using Helm charts", - "url": "/automate-workflows/kubernetes-helm-deployment" - }, - { - "displayName": "Tag a set of resources efficiently", - "url": "/automate-workflows/5-mins-tag-resources" - }, - { - "displayName": "Automated end-to-end tagging of entities", - "url": "/automate-workflows/automated-tagging" - }, - { - "displayName": "Use New Relic to diagnose problems in your system", - "url": "/automate-workflows/diagnose-problems", - "children": [ - { - "displayName": "High response times", - "url": "/automate-workflows/diagnose-problems/high-response-times" - }, - { - "displayName": "Error alerts", - "url": "/automate-workflows/diagnose-problems/error-alerts" - } - ] - } - ] - }, - { - "displayName": "Build apps", - "url": "/build-apps", - "children": [ - { - "displayName": "Set up your development environment", - "url": "/build-apps/set-up-dev-env" - }, - { - "displayName": "Create a 'Hello, World!' app", - "url": "/build-apps/build-hello-world-app" - }, - { - "displayName": "Publish and deploy your app", - "url": "/build-apps/publish-deploy" - }, - { - "displayName": "Permissions for managing apps", - "url": "/build-apps/permission-manage-apps" - }, - { - "displayName": "Map pageviews by region", - "url": "/build-apps/map-pageviews-by-region" - }, - { - "displayName": "Add a time picker", - "url": "/build-apps/add-time-picker-guide" - }, - { - "displayName": "Add the NerdGraphQuery component to an app", - "url": "/build-apps/add-nerdgraphquery-guide" - }, - { - "displayName": "Add tables to your New Relic One application", - "url": "/build-apps/howto-use-nrone-table-components" - }, - { - "displayName": "Add, query, and mutate data using NerdStorage", - "url": "/build-apps/add-query-mutate-data-nerdstorage" - }, - { - "displayName": "See all open source apps", - "url": "https://opensource.newrelic.com/nerdpacks/" - }, - { - "displayName": "Build custom visualizations for dashboards", - "url": "/build-apps/build-visualization" - } - ] - }, - { - "displayName": "Try our APIs", - "url": "/try-our-apis", - "children": [ - { - "displayName": "Telemetry APIs", - "children": [ - { - "displayName": "Metrics API", - "url": "https://docs.newrelic.com/docs/telemetry-data-platform/get-data/apis/introduction-metric-api" - }, - { - "displayName": "Event API", - "url": "https://docs.newrelic.com/docs/telemetry-data-platform/ingest-manage-data/ingest-apis/use-event-api-report-custom-events" - }, - { - "displayName": "Log API", - "url": "https://docs.newrelic.com/docs/logs/log-management/log-api/introduction-log-api" - }, - { - "displayName": "Trace API", - "url": "https://docs.newrelic.com/docs/understand-dependencies/distributed-tracing/trace-api/introduction-trace-api" - } - ] - }, - { - "displayName": "REST & GraphQL APIs", - "children": [ - { - "displayName": "NerdGraph API Explorer", - "url": "https://api.newrelic.com/graphiql" - }, - { - "displayName": "REST API Explorer", - "url": "https://rpm.newrelic.com/api/explore" - }, - { - "displayName": "Insights API", - "url": "https://docs.newrelic.com/docs/insights/insights-api/get-data/query-insights-event-data-api" - }, - { - "displayName": "Synthetics API", - "url": "https://docs.newrelic.com/docs/apis/synthetics-rest-api" - } - ] - } - ] - }, - { - "displayName": "Explore docs", - "children": [ - { - "displayName": "New Relic One CLI", - "url": "/explore-docs/nr1-cli", - "children": [ - { - "displayName": "Common commands", - "url": "/explore-docs/nr1-common" - }, - { - "displayName": "Config commands", - "url": "/explore-docs/nr1-config" - }, - { - "displayName": "Nerdpack commands", - "url": "/explore-docs/nr1-nerdpack" - }, - { - "displayName": "Subscription commands", - "url": "/explore-docs/nr1-subscription" - }, - { - "displayName": "Plugin commands", - "url": "/explore-docs/nr1-plugins" - }, - { - "displayName": "Catalog commands", - "url": "/explore-docs/nr1-catalog" - } - ] - }, - { - "displayName": "New Relic CLI", - "url": "/explore-docs/newrelic-cli" - }, - { - "displayName": "Nerdpack file structure", - "url": "/explore-docs/nerdpack-file-structure" - }, - { - "displayName": "Intro to Nerdstorage", - "url": "/explore-docs/nerdstorage" - }, - { - "displayName": "Intro to NerdstorageVault", - "url": "/explore-docs/nerdstoragevault" - }, - { - "displayName": "Query and store data", - "url": "/explore-docs/query-and-store-data" - }, - { - "displayName": "New Relic One SDK Component library", - "url": "/explore-docs/intro-to-sdk", - "children": [ - { - "displayName": "Controls", - "children": [ - { - "displayName": "AccountPicker", - "url": "/components/account-picker" - }, - { - "displayName": "Button", - "url": "/components/button" - }, - { - "displayName": "Checkbox", - "url": "/components/checkbox" - }, - { - "displayName": "Dropdown", - "url": "/components/dropdown" - }, - { - "displayName": "DropdownItem", - "url": "/components/dropdown-item" - }, - { - "displayName": "DropdownSection", - "url": "/components/dropdown-section" - }, - { - "displayName": "MultilineTextField", - "url": "/components/multiline-text-field" - }, - { - "displayName": "Radio", - "url": "/components/radio" - }, - { - "displayName": "RadioGroup", - "url": "/components/radio-group" - }, - { - "displayName": "SegmentedControl", - "url": "/components/segmented-control" - }, - { - "displayName": "SegmentedControlItem", - "url": "/components/segmented-control-item" - }, - { - "displayName": "Select", - "url": "/components/select" - }, - { - "displayName": "SelectItem", - "url": "/components/select-item" - }, - { - "displayName": "Switch", - "url": "/components/switch" - }, - { - "displayName": "TextField", - "url": "/components/text-field" - } - ] - }, - { - "displayName": "Tables", - "children": [ - { - "displayName": "Table", - "url": "/components/table" - }, - { - "displayName": "TableHeader", - "url": "/components/table-header" - }, - { - "displayName": "TableHeaderCell", - "url": "/components/table-header-cell" - }, - { - "displayName": "TableRow", - "url": "/components/table-row" - }, - { - "displayName": "TableRowCell", - "url": "/components/table-row-cell" - }, - { - "displayName": "EntityTitleTableRowCell", - "url": "/components/entity-title-table-row-cell" - }, - { - "displayName": "FavoriteTableRowCell", - "url": "/components/favorite-table-row-cell" - }, - { - "displayName": "MetricTableRowCell", - "url": "/components/metric-table-row-cell" - }, - { - "displayName": "SparklineTableRowCell", - "url": "/components/sparkline-table-row-cell" - }, - { - "displayName": "UserTableRowCell", - "url": "/components/user-table-row-cell" - } - ] - }, - { - "displayName": "Feedback", - "children": [ - { - "displayName": "Icon", - "url": "/components/icon" - }, - { - "displayName": "Spinner", - "url": "/components/spinner" - }, - { - "displayName": "Toast", - "url": "/components/toast" - } - ] - }, - { - "displayName": "Indicators", - "children": [ - { - "displayName": "Badge", - "url": "/components/badge" - } - ] - }, - { - "displayName": "Overlays", - "children": [ - { - "displayName": "Modal", - "url": "/components/modal" - }, - { - "displayName": "Popover", - "url": "/components/popover" - }, - { - "displayName": "PopoverBody", - "url": "/components/popover-body" - }, - { - "displayName": "PopoverTrigger", - "url": "/components/popover-trigger" - }, - { - "displayName": "Tooltip", - "url": "/components/tooltip" - } - ] - }, - { - "displayName": "Structure", - "children": [ - { - "displayName": "AutoSizer", - "url": "/components/auto-sizer" - }, - { - "displayName": "Card", - "url": "/components/card" - }, - { - "displayName": "CardBody", - "url": "/components/card-body" - }, - { - "displayName": "CardHeader", - "url": "/components/card-header" - }, - { - "displayName": "Grid", - "url": "/components/grid" - }, - { - "displayName": "GridItem", - "url": "/components/grid-item" - }, - { - "displayName": "Layout", - "url": "/components/layout" - }, - { - "displayName": "LayoutItem", - "url": "/components/layout-item" - }, - { - "displayName": "List", - "url": "/components/list" - }, - { - "displayName": "ListItem", - "url": "/components/list-item" - }, - { - "displayName": "Spacing", - "url": "/components/spacing" - }, - { - "displayName": "Stack", - "url": "/components/stack" - }, - { - "displayName": "StackItem", - "url": "/components/stack-item" - }, - { - "displayName": "Tabs", - "url": "/components/tabs" - }, - { - "displayName": "TabsItem", - "url": "/components/tabs-item" - } - ] - }, - { - "displayName": "Text", - "children": [ - { - "displayName": "BlockText", - "url": "/components/block-text" - }, - { - "displayName": "HeadingText", - "url": "/components/heading-text" - }, - { - "displayName": "Link", - "url": "/components/link" - } - ] - }, - { - "displayName": "Charts", - "url": "/components/charts", - "children": [ - { - "displayName": "AreaChart", - "url": "/components/area-chart" - }, - { - "displayName": "BarChart", - "url": "/components/bar-chart" - }, - { - "displayName": "BillboardChart", - "url": "/components/billboard-chart" - }, - { - "displayName": "ChartGroup", - "url": "/components/chart-group" - }, - { - "displayName": "FunnelChart", - "url": "/components/funnel-chart" - }, - { - "displayName": "HeatmapChart", - "url": "/components/heatmap-chart" - }, - { - "displayName": "HistogramChart", - "url": "/components/histogram-chart" - }, - { - "displayName": "JsonChart", - "url": "/components/json-chart" - }, - { - "displayName": "LineChart", - "url": "/components/line-chart" - }, - { - "displayName": "PieChart", - "url": "/components/pie-chart" - }, - { - "displayName": "ScatterChart", - "url": "/components/scatter-chart" - }, - { - "displayName": "SparklineChart", - "url": "/components/sparkline-chart" - }, - { - "displayName": "StackedBarChart", - "url": "/components/stacked-bar-chart" - }, - { - "displayName": "TableChart", - "url": "/components/table-chart" - } - ] - }, - { - "displayName": "Query and storage", - "children": [ - { - "displayName": "AccountStorageMutation", - "url": "/components/account-storage-mutation" - }, - { - "displayName": "AccountStorageQuery", - "url": "/components/account-storage-query" - }, - { - "displayName": "AccountsQuery", - "url": "/components/accounts-query" - }, - { - "displayName": "EntitiesByDomainTypeQuery", - "url": "/components/entities-by-domain-type-query" - }, - { - "displayName": "EntitiesByGuidsQuery", - "url": "/components/entities-by-guids-query" - }, - { - "displayName": "EntitiesByNameQuery", - "url": "/components/entities-by-name-query" - }, - { - "displayName": "EntityByGuidQuery", - "url": "/components/entity-by-guid-query" - }, - { - "displayName": "EntityCountQuery", - "url": "/components/entity-count-query" - }, - { - "displayName": "EntitySearchQuery", - "url": "/components/entity-search-query" - }, - { - "displayName": "EntityStorageMutation", - "url": "/components/entity-storage-mutation" - }, - { - "displayName": "EntityStorageQuery", - "url": "/components/entity-storage-query" - }, - { - "displayName": "NerdGraphMutation", - "url": "/components/nerd-graph-mutation" - }, - { - "displayName": "NerdGraphQuery", - "url": "/components/nerd-graph-query" - }, - { - "displayName": "NrqlQuery", - "url": "/components/nrql-query" - }, - { - "displayName": "UserQuery", - "url": "/components/user-query" - }, - { - "displayName": "UserStorageMutation", - "url": "/components/user-storage-mutation" - }, - { - "displayName": "UserStorageQuery", - "url": "/components/user-storage-query" - } - ] - }, - { - "displayName": "Platform APIs", - "children": [ - { - "displayName": "NerdletStateContext", - "url": "/components/nerdlet-state-context" - }, - { - "displayName": "PlatformStateContext", - "url": "/components/platform-state-context" - }, - { - "displayName": "logger", - "url": "/apis/logger" - }, - { - "displayName": "navigation", - "url": "/apis/navigation" - }, - { - "displayName": "nerdlet", - "url": "/apis/nerdlet" - }, - { - "displayName": "ngql", - "url": "/apis/ngql" - } - ] - } - ] - } - ] - }, - { - "displayName": "Developer events", - "url": "/developer-events", - "children": [ - { - "displayName": "Past events", - "children": [ - { - "displayName": "Kubecon & CloudNativeCon", - "url": "/kubecon-europe-2020" - }, - { - "displayName": "Nerd days 1.0", - "url": "/nerd-days" - }, - { - "displayName": "All things open", - "url": "/all-things-open" - } - ] - } - ] - }, - { - "displayName": "The Relicans", - "url": "/relicans" - }, - { - "displayName": "Developer champions", - "url": "/developer-champion" - }, - { - "displayName": "New Relic Builders", - "url": "/builders" - }, - { - "displayName": "Nerd Bytes", - "url": "/nerd-bytes" - }, - { - "displayName": "Podcasts", - "url": "/podcasts" - } -] diff --git a/src/i18n/translations/en/translation.json b/src/i18n/translations/en/translation.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/src/i18n/translations/en/translation.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/src/images/futurestack-registration.png b/src/images/futurestack-registration.png new file mode 100644 index 000000000..9b9a21089 Binary files /dev/null and b/src/images/futurestack-registration.png differ diff --git a/src/layouts/MainLayout.js b/src/layouts/MainLayout.js index 387822bee..cc5e90613 100644 --- a/src/layouts/MainLayout.js +++ b/src/layouts/MainLayout.js @@ -6,13 +6,15 @@ import { GlobalHeader, Layout, Logo, + MobileHeader, + Navigation, + NavItem, SearchInput, } from '@newrelic/gatsby-theme-newrelic'; -import MobileHeader from '../components/MobileHeader'; import { Link } from 'gatsby'; -import Navigation from '../components/Navigation'; import '../components/styles.scss'; import { useLocation } from '@reach/router'; +import pages from '../data/nav.yml'; const MainLayout = ({ children, pageContext }) => { const location = useLocation(); @@ -27,15 +29,13 @@ const MainLayout = ({ children, pageContext }) => { return ( <> - setIsMobileNavOpen(!isMobileNavOpen)} - /> + + + {pages.map((page, idx) => ( + + ))} + + { value={searchTerm} /> - + + {pages.map((page, idx) => ( + + ))} + {children} diff --git a/src/markdown-pages/automate-workflows/get-started-terraform.mdx b/src/markdown-pages/automate-workflows/get-started-terraform.mdx index 9a64bcbd5..e30ec68f6 100644 --- a/src/markdown-pages/automate-workflows/get-started-terraform.mdx +++ b/src/markdown-pages/automate-workflows/get-started-terraform.mdx @@ -66,7 +66,7 @@ terraform { required_providers { newrelic = { source = "newrelic/newrelic" - version = "~> 2.12" + version = "~> 2.21" } } } diff --git a/src/markdown-pages/build-apps/add-nerdgraphquery-guide.mdx b/src/markdown-pages/build-apps/add-nerdgraphquery-guide.mdx index 3706a2470..eb267e1d7 100644 --- a/src/markdown-pages/build-apps/add-nerdgraphquery-guide.mdx +++ b/src/markdown-pages/build-apps/add-nerdgraphquery-guide.mdx @@ -50,7 +50,7 @@ If you've already installed the New Relic One CLI, but you can't remember your a -For additional details, see [Set up your development environment](set-up-dev-env). +For additional details, see [Set up your development environment](/build-apps/set-up-dev-env). ## Prepare the sample code diff --git a/src/markdown-pages/build-apps/add-time-picker-guide.mdx b/src/markdown-pages/build-apps/add-time-picker-guide.mdx index b5d834218..28288383c 100644 --- a/src/markdown-pages/build-apps/add-time-picker-guide.mdx +++ b/src/markdown-pages/build-apps/add-time-picker-guide.mdx @@ -43,7 +43,7 @@ If you've already installed the New Relic One CLI, but you can't remember your a -For additional details, see [Set up your development environment](set-up-dev-env). +For additional details, see [Set up your development environment](/build-apps/set-up-dev-env). ## Prepare the time picker sample code diff --git a/src/markdown-pages/build-apps/build-hello-world-app.mdx b/src/markdown-pages/build-apps/build-hello-world-app.mdx index 25568e69d..4f307b2cf 100644 --- a/src/markdown-pages/build-apps/build-hello-world-app.mdx +++ b/src/markdown-pages/build-apps/build-hello-world-app.mdx @@ -41,7 +41,7 @@ If you haven't already installed it, do the following: - Install [Node.js](https://nodejs.org/en/download/). - Complete all the steps in the [CLI quick start](https://one.newrelic.com/launcher/developer-center.launcher?pane=eyJuZXJkbGV0SWQiOiJkZXZlbG9wZXItY2VudGVyLmRldmVsb3Blci1jZW50ZXIifQ==). -For additional details about setting up your environment, see [Set up your development environment](set-up-dev-env). +For additional details about setting up your environment, see [Set up your development environment](/build-apps/set-up-dev-env). diff --git a/src/markdown-pages/explore-docs/nr1-cli.mdx b/src/markdown-pages/explore-docs/nr1-cli.mdx index c605a3953..d4ef26b30 100644 --- a/src/markdown-pages/explore-docs/nr1-cli.mdx +++ b/src/markdown-pages/explore-docs/nr1-cli.mdx @@ -56,7 +56,7 @@ Use the [NR1 VS Code extension](https://marketplace.visualstudio.com/items?itemN This table provides descriptions for the New Relic One commands. For more context, including usage and option details, click any individual command or the command category. -For details on user permissions, see [Authentication and permissions](/build-apps/set-up-dev-env). +For details on user permissions, see [Authentication and permissions](/build-apps/permission-manage-apps). For more on how to serve and publish your application, see our guide on [Deploying your New Relic One app](/build-tools/new-relic-one-applications/publish-deploy). diff --git a/src/pages/index.js b/src/pages/index.js index bad5f431f..69a9e88d3 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -11,12 +11,12 @@ import GuideTile from '../components/GuideTile/GuideTile'; import PageLayout from '../components/PageLayout'; import FeatherIcon from '../components/FeatherIcon'; import FeaturedGuideTile from '../components/FeaturedGuideTile'; -import NewRelicIcon from '../components/NewRelicIcon'; import { PageContext } from '../components/PageContext'; import { pageContext } from '../types'; import styles from './index.module.scss'; import devChampionBadge from '../images/developer-champion/dev-champion-badge.png'; import podcastBadge from '../images/podcasts/podcasts-badge.png'; +import fsBanner from '../images/futurestack-registration.png'; import Video from '../components/Video'; const getStartedGuides = [ @@ -33,14 +33,14 @@ const getStartedGuides = [ title: 'Add tags to apps', description: `Add tags to applications you instrument for easier filtering and organization`, url: '/automate-workflows/5-mins-tag-resources', - icon: , + icon: , }, { duration: '12 min', title: 'Build a Hello, World! app', description: `Build a Hello, World! app and publish it to your local New Relic One Catalog`, url: '/build-apps/build-hello-world-app', - icon: , + icon: , }, ]; @@ -59,6 +59,19 @@ const IndexPage = ({ data, pageContext }) => { +
    + + Register for FutureStack 2021 + +
    { + const podcastsMeta = [ + { + id: '1225223', + title: 'Observy McObservface', + }, + { + id: '1677727', + title: 'Polyglot', + }, + { + id: '1677670', + title: 'Launchies', + }, + ]; + return ( <> @@ -54,14 +69,20 @@ const PodcastsPage = () => { alt="podcasts header" />
    -
    -
    -