Skip to content

Commit

Permalink
fix: fix merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
jaesius committed Mar 12, 2021
2 parents 77a7261 + b926e3d commit 0af1086
Show file tree
Hide file tree
Showing 48 changed files with 1,303 additions and 2,213 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)


Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
96 changes: 45 additions & 51 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand All @@ -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',
},
},
},
Expand Down
4 changes: 0 additions & 4 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
),
},
});
});
Expand Down
1 change: 1 addition & 0 deletions gatsby-ssr.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import React, { createContext } from 'react';
import wrapPageElement from './gatsby/wrap-page-element';

global.window = {
requestAnimationFrame: () => {},
__NR1_SDK__: {
default: {
PlatformStateContext: createContext(),
Expand Down
11 changes: 1 addition & 10 deletions gatsby/wrap-page-element.js
Original file line number Diff line number Diff line change
@@ -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 (
<>
<Global
Expand Down Expand Up @@ -43,9 +36,7 @@ const wrapPageElement = ({ element, props }) => {
`}
/>
<PageContext.Provider value={props.pageContext}>
<BreadcrumbContext.Provider value={crumbs}>
{element}
</BreadcrumbContext.Provider>
{element}
</PageContext.Provider>
</>
);
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand Down
25 changes: 25 additions & 0 deletions src/@newrelic/gatsby-theme-newrelic/icons/newrelic.js
Original file line number Diff line number Diff line change
@@ -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,
};
25 changes: 25 additions & 0 deletions src/@newrelic/gatsby-theme-newrelic/icons/newrelic/automation.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import React from 'react';
import NewRelicSVG from '../../../../components/NewRelicSVG';

const AutomationIcon = (props) => (
<NewRelicSVG {...props}>
<g>
<path
d="M14.6,14.3l1.4-0.8l-1.9-3.3l-1.4,0.8c-0.7-0.6-1.5-1.1-2.4-1.4V7.9H6.4v1.6C5.5,9.8,4.7,10.3,4,10.9l-1.4-0.8
l-1.9,3.3L2,14.3c-0.2,1-0.2,1.8,0,2.8l-1.4,0.8l1.9,3.3L4,20.4c0.7,0.6,1.5,1.1,2.4,1.4v1.6h3.9v-1.6c0.9-0.3,1.7-0.8,2.4-1.4
l1.4,0.8l1.9-3.3l-1.4-0.8C14.8,16.1,14.8,15.2,14.6,14.3z"
/>
<circle cx="8.3" cy="15.7" r="2.6" />
</g>
<g>
<path
d="M22.7,4.2l0.8-0.5l-1.2-2l-0.8,0.5c-0.4-0.4-0.9-0.7-1.5-0.8v-1h-2.3v1c-0.5,0.2-1,0.5-1.5,0.8l-0.8-0.5
l-1.2,2l0.8,0.5c-0.1,0.6-0.1,1.1,0,1.7l-0.8,0.5l1.2,2l0.8-0.5c0.4,0.4,0.9,0.7,1.5,0.8v1h2.3v-1c0.5-0.2,1-0.5,1.5-0.8l0.8,0.5
l1.2-2l-0.8-0.5C22.9,5.3,22.9,4.8,22.7,4.2z"
/>
<circle cx="18.9" cy="5.1" r="1.6" />
</g>
</NewRelicSVG>
);

export default AutomationIcon;
15 changes: 15 additions & 0 deletions src/@newrelic/gatsby-theme-newrelic/icons/newrelic/book.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import React from 'react';
import NewRelicSVG from '../../../../components/NewRelicSVG';

const BookIcon = (props) => (
<NewRelicSVG {...props}>
<path d="M16.5 2.5c0 0-1.893 0-2 0 -2 0-3 1.5-3 3.5 0-2-1-3.5-3-3.5 -.5 0-8 0-8 0v16c0 0 6.5 0 8 0 2 0 3 1 3 3 0-2 1-3 3-3 1.5 0 8 0 8 0v-16h-2" />
<line x1="11.5" x2="11.5" y1="6" y2="21" />
<polygon
stroke="var(--accent-color)"
points="20.5,10 18.5,8 16.5,10 16.5,1.5 20.5,1.5"
/>
</NewRelicSVG>
);

export default BookIcon;
13 changes: 13 additions & 0 deletions src/@newrelic/gatsby-theme-newrelic/icons/newrelic/build-apps.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import React from 'react';
import NewRelicSVG from '../../../../components/NewRelicSVG';

const BuildAppsIcon = (props) => (
<NewRelicSVG {...props}>
<rect x="14" y="1" width="9" height="9" />
<rect x="14" y="14" width="9" height="9" />
<rect x="1" y="14" width="9" height="9" />
<rect x="1" y="1" width="9" height="9" />
</NewRelicSVG>
);

export default BuildAppsIcon;
10 changes: 10 additions & 0 deletions src/@newrelic/gatsby-theme-newrelic/icons/newrelic/builders.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from 'react';
import NewRelicSVG from '../../../../components/NewRelicSVG';

const BuildersIcon = (props) => (
<NewRelicSVG {...props}>
<path d="M12.7,5.3c-0.38,0.39-0.38,1.01,0,1.4l1.6,1.6c0.39,0.38,1.01,0.38,1.4,0l3.77-3.77 c1.37,3.02,0.03,6.57-2.99,7.94c-1.57,0.71-3.37,0.71-4.95,0l-6.91,6.91c-0.83,0.83-2.17,0.83-3,0s-0.83-2.17,0-3l6.91-6.91 C7.17,6.45,8.51,2.9,11.52,1.53c1.57-0.71,3.37-0.71,4.95,0L12.7,5.3L12.7,5.3z" />
</NewRelicSVG>
);

export default BuildersIcon;
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React from 'react';
import NewRelicSVG from '../../../../components/NewRelicSVG';

const DeveloperChampionsIcon = (props) => (
<NewRelicSVG {...props}>
<path d="M5.37,15.76c-0.24,0.04-0.48,0.09-0.7,0.14c1.07,2.85,3.18,5.75,7.32,8.1v-0.76 C8.34,21.07,6.39,18.47,5.37,15.76z" />
<path d="M4.33,10.15C4.31,9.7,4.3,9.25,4.3,8.81V3.63c0.66-0.1,1.64-0.23,2.29-0.4l3.46-1.48 c0.02-0.01,0.04-0.02,0.06-0.03c0.61-0.28,1.29-0.6,1.88-0.94V0c-0.76,0.51-1.8,0.96-2.64,1.35l-2.04,1 C6.22,2.69,4.76,2.93,3.59,3.08v5.73c0,0.49,0.01,1,0.03,1.54C3.84,10.28,4.08,10.21,4.33,10.15z" />
<path d="M7.36,5.12" />
<path d="M13.88,1.72c0.02,0.01,0.04,0.02,0.06,0.03l3.46,1.48c0.64,0.16,1.63,0.3,2.29,0.4v5.18 c0,0.44-0.01,0.89-0.03,1.34c0.25,0.06,0.49,0.13,0.71,0.19c0.02-0.54,0.03-1.05,0.03-1.54V3.08c-1.17-0.14-2.63-0.39-3.71-0.72 l-2.04-1C13.81,0.96,12.76,0.51,12,0l-0.12,0.4L12,0.78C12.6,1.12,13.27,1.44,13.88,1.72z" />
<path d="M18.62,15.76c-1.02,2.71-2.97,5.31-6.61,7.47l-0.12,0.33L12,24c4.14-2.35,6.25-5.25,7.32-8.1 C19.1,15.85,18.86,15.81,18.62,15.76z" />
<path d="M20.94,9.98C19.1,9.32,15.67,8.9,11.98,8.9v0.51H12c3.52,0,6.92,0.41,8.65,1.03c0.72,0.26,1.05,0.74,1.05,1.55 v4.78c-1.19-0.88-5.09-1.53-9.71-1.53v0.51c3.51,0,8.9,0.82,8.9,1.83c0,0.52-1.81,1-3.59,1.33c-0.06,0.11-0.13,0.22-0.19,0.33 c2.7-0.38,5.16-1.03,5.16-1.75v-5.59C22.26,10.94,21.83,10.3,20.94,9.98z" />
<path d="M8.05,11.15" />
<path d="M3.06,9.98C4.89,9.32,8.3,8.9,11.98,8.9v0.51h-0.01c-3.51,0-6.89,0.41-8.62,1.03C2.62,10.71,2.3,11.19,2.3,12 v4.78c1.19-0.88,5.07-1.53,9.68-1.53v0.51c-3.5,0-8.87,0.82-8.87,1.83c0,0.52,1.81,1,3.58,1.33c0.06,0.11,0.13,0.22,0.19,0.33 c-2.69-0.38-5.15-1.03-5.15-1.75v-5.59C1.74,10.94,2.17,10.3,3.06,9.98z" />
<path d="M750.7,362.2" />
</NewRelicSVG>
);

export default DeveloperChampionsIcon;
10 changes: 10 additions & 0 deletions src/@newrelic/gatsby-theme-newrelic/icons/newrelic/event.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from 'react';
import NewRelicSVG from '../../../../components/NewRelicSVG';

const EventIcon = (props) => (
<NewRelicSVG {...props}>
<polygon points="3 11 22 2 13 21 11 13 3 11" />
</NewRelicSVG>
);

export default EventIcon;
19 changes: 19 additions & 0 deletions src/@newrelic/gatsby-theme-newrelic/icons/newrelic/nerd-bytes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import React from 'react';
import NewRelicSVG from '../../../../components/NewRelicSVG';

const nerdBytesIcon = (props) => (
<NewRelicSVG {...props}>
<>
<rect x="2" y="2" width="20" height="20" rx="2.18" ry="2.18" />
<line x1="7" y1="2" x2="7" y2="22" />
<line x1="17" y1="2" x2="17" y2="22" />
<line x1="2" y1="12" x2="22" y2="12" />
<line x1="2" y1="7" x2="7" y2="7" />
<line x1="2" y1="17" x2="7" y2="17" />
<line x1="17" y1="17" x2="22" y2="17" />
<line x1="17" y1="7" x2="22" y2="7" />
</>
</NewRelicSVG>
);

export default nerdBytesIcon;
14 changes: 14 additions & 0 deletions src/@newrelic/gatsby-theme-newrelic/icons/newrelic/podcasts.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0af1086

Please sign in to comment.