Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/jcountsNR/docs-website i…
Browse files Browse the repository at this point in the history
…nto develop
  • Loading branch information
jcountsNR committed Jan 24, 2024
2 parents e1eb88c + 23b60b3 commit f655eb5
Show file tree
Hide file tree
Showing 6,780 changed files with 104,179 additions and 71,626 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
24 changes: 24 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/eng_pr_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
### ✨ Summary

<!-- Add context such as what problem this solves or steps to reproduce -->

### 🖼️ Screenshots

<!-- Add some helpful imagery (optional) -->

### 🔮 Engineering checklist

<!-- Remove any items that do not apply -->

- [ ] Relevant documentation including README's or Confluence are updated to reflect these changes
- [ ] Code changes are self-documenting or clearly commented/documented
- [ ] Changes that effect tech writers have been communicated to tech docs team
- [ ] New components created for use in MDX files have been serialized/deserialized
- [ ] New tests are added where applicable and total coverage remains >70%
- [ ] No new warnings or errors where added to the browser or build console
- All downstream dependencies for DaaS have been considered for negative impacts
- [ ] What's new JSON endpoints
- [ ] Release notes JSON & EOL pages
- [ ] The build preview has been checked for expected functionality on desktop browsers
- [ ] The build preview has been checked for expected functionality on mobile browsers
- [ ] Synthetics tests have been considered for any changes that might trigger false positives
2 changes: 0 additions & 2 deletions .github/auto_assign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ reviewers:
- paperclypse
- rhetoric101
- homelessbirds
- nbaenam
- a-sassman
- ally-sassman
- akristen
- jeff-colucci
Expand Down
4 changes: 2 additions & 2 deletions .github/styles/new-relic/ComplexWords.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ level: suggestion
action:
name: replace
swap:
"approximate(?:ly)?": about
'approximate(?:ly)?': about
abundance: plenty
accelerate: speed up
accentuate: stress
Expand All @@ -19,7 +19,7 @@ swap:
acquiesce: agree
acquire: get|buy
additional: more|extra
address: discuss
'[^IP] address': discuss
addressees: you
adjacent to: next to
adjustment: change
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/attribute-dictionary-comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Attribute dictionary updates

on:
pull_request:
branches:
- develop

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
deny-attribute-dictionary-changes:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Prevent file change
uses: xalvarez/prevent-file-change-action@v1
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
pattern: .*\attribute-dictionary.json
trustedAuthors: nr-opensource-bot

- name: Comment if JSON file is modified
if: failure()
uses: thollander/actions-comment-pull-request@v2
with:
message: |
> [!WARNING]
> `attribute-dictionary.json` is an autogenerated file.
>
> Changes to attribute dictionary should be made through [source.datanerd.us/docs-eng/attribute-dictionary](https://source.datanerd.us/docs-eng/attribute-dictionary)
2 changes: 1 addition & 1 deletion .github/workflows/auto-assign-reviewer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ jobs:
add-reviews:
runs-on: ubuntu-latest
steps:
- uses: kentaro-m/[email protected].0
- uses: kentaro-m/[email protected].5
22 changes: 22 additions & 0 deletions .github/workflows/check-for-keys.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Check for Keys

on:
pull_request:
types:
- opened
branches:
- develop

jobs:
check-for-keys:
name: Check for keys in files and commit history
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0

- name: Check for keys
run: ./scripts/actions/check-for-keys.sh
2 changes: 2 additions & 0 deletions .github/workflows/check-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ jobs:

- name: Convert images to WEBP
run: yarn convert-to-webp -g
id: convert-images

- name: Commit changes
id: commit-changes
if: steps.convert-images.outputs.convertedImages != 0
run: |
git config --local user.email "${{ env.BOT_EMAIL }}"
git config --local user.name "${{ env.BOT_NAME }}"
Expand Down
9 changes: 0 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,3 @@ jobs:
- name: Set Release Version from Tag
run: echo "RELEASE_VERSION=${{ env.NEW_TAG }}" >> $GITHUB_ENV

- name: Create New Relic deployment marker
uses: newrelic/[email protected]
with:
apiKey: ${{ secrets.NEW_RELIC_API_KEY_DEPLOY_MARKERS }}
guid: ${{ secrets.NEW_RELIC_DEPLOYMENT_ENTITY_GUID }}
region: 'staging'
version: '${{ env.RELEASE_VERSION }}'
user: '${{ github.actor }}'
17 changes: 14 additions & 3 deletions .github/workflows/vale-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,20 @@ jobs:
uses: actions/checkout@v3

- name: Run vale
uses: errata-ai/vale-action@v1
uses: errata-ai/vale-action@reviewdog
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
files: __onlyModified
onlyAnnotateModifiedLines: true
reporter: github-check
fail_on_error: true
filter_mode: added
token: ${{secrets.GITHUB_TOKEN}}

- name: Comment on Failure
if: failure()
uses: thollander/actions-comment-pull-request@v2
with:
message: |
> [!NOTE]
> Our Vale automated writing feedback tool has suggestions for this PR. You can view these suggestions in the *Files changed* tab. If you're not a New Relic docs writer, we'll review any comments and you don't need to take any action (though feel free to make edits if you like!).
39 changes: 39 additions & 0 deletions .github/workflows/verify-mdx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: verify mdx files

on:
pull_request:
branches:
- develop
- main

env:
NODE_OPTIONS: '--max-old-space-size=4096'
CHOKIDAR_USEPOLLING: 1
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
verify-mdx:
name: run verify
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16

- name: Cache dependencies
id: yarn-cache
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock') }}

- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile

- name: Run verify-mdx
run: yarn verify-mdx
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ yarn start

Your site is now running at [`http://localhost:8000`](http://localhost:8000)!

The first time you build the site locally, it will take upwards of 20 minutes. This is normal, and will take signifigantly less time afterwards.
The first time you build the site locally, it will take upwards of 20 minutes. This is normal, and will take significantly less time afterward.

### Dependencies

Expand Down Expand Up @@ -287,7 +287,7 @@ if you face issues in contributing.

### General Install, compile or build issues

Many of the common errors you'll face can be resolve by the following:
Many of the common errors you'll face can be resolved by the following:

1. Ensure you are using `yarn` not `npm`
2. Always run `git pull` whenever you intend to create a new working branch
Expand Down
34 changes: 22 additions & 12 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,22 @@ const ignoreFolders = process.env.BUILD_FOLDERS
)
.map((folder) => `${__dirname}/src/content/docs/${folder}/*`)
: [];
const allI18nFolders = fs
.readdirSync(`${__dirname}/src/i18n/content`)
.filter((folder) => !folder.startsWith('.'));

const autoLinkHeaders = {
resolve: 'gatsby-remark-autolink-headers',
options: {
icon:
'<svg xmlns="http://www.w3.org/2000/svg" focusable="false" width="1rem" height="1rem" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3"></path><line x1="8" y1="12" x2="16" y2="12"></line></svg>',
},
const ignoreI18nFolders = () => {
if (process.env.BUILD_LANG) {
return allI18nFolders
.map((folder) => {
if (folder !== process.env.BUILD_LANG) {
return `${__dirname}/src/i18n/content/${folder}`;
}
return null;
})
.filter(Boolean);
}
return [];
};

module.exports = {
Expand Down Expand Up @@ -86,10 +95,7 @@ module.exports = {
options: {
name: 'translated-content',
path: `${__dirname}/src/i18n/content`,
ignore:
process.env.BUILD_I18N === 'false'
? [`${__dirname}/src/i18n/content/*`]
: [],
ignore: ignoreI18nFolders(),
},
},
{
Expand Down Expand Up @@ -125,7 +131,7 @@ module.exports = {
resolve: 'gatsby-remark-images',
options: {
maxWidth: 850,
linkImagesToOriginal: true,
linkImagesToOriginal: false,
backgroundColor: 'transparent',
disableBgImageOnAlpha: true,
},
Expand Down Expand Up @@ -173,7 +179,11 @@ module.exports = {
disableBgImageOnAlpha: true,
},
},
autoLinkHeaders,
{
resolve: require.resolve(
'./plugins/gatsby-remark-autolink-headers-custom'
),
},
// This MUST come after `gatsby-remark-autolink-headers` to ensure the
// link created for the icon has the proper id.
//
Expand Down
29 changes: 4 additions & 25 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
type
subject
redirects
hideNavs
}
}
}
Expand Down Expand Up @@ -307,10 +306,10 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
});
});

// Redirect for VSU page to new Introduction to APM doc
// Redirect for old VSU Introduction to APM .js doc
createRedirect({
fromPath: '/docs/apm/new-relic-apm/getting-started/introduction-apm/',
toPath: '/introduction-apm',
fromPath: '/introduction-apm',
toPath: '/docs/apm/new-relic-apm/getting-started/introduction-apm/',
isPermanent: false,
redirectInBrowser: true,
});
Expand Down Expand Up @@ -352,7 +351,6 @@ exports.createSchemaCustomization = (
type Frontmatter {
isFeatured: Boolean
translationType: String
hideNavs: Boolean
eolDate: String
downloadLink: String
signupBanner: SignupBanner
Expand Down Expand Up @@ -456,10 +454,6 @@ exports.createResolvers = ({ createResolvers }) => {
? source.translationType
: null,
},
hideNavs: {
resolve: (source) =>
hasOwnProperty(source, 'hideNavs') ? source.hideNavs : null,
},
eolDate: {
resolve: (source) =>
hasOwnProperty(source, 'eolDate') ? source.eolDate : null,
Expand Down Expand Up @@ -501,20 +495,6 @@ exports.createResolvers = ({ createResolvers }) => {
exports.onCreatePage = ({ page, actions }) => {
const { createPage } = actions;

if (page.path === '/') {
page.context.quicklaunchSlug =
'docs/new-relic-solutions/get-started/quick-launch-guide';
page.context.layout = 'homepage';
}
if (page.path === '/jp/') {
page.context.quicklaunchSlug =
'jp/docs/new-relic-solutions/get-started/quick-launch-guide';
}
if (page.path === '/kr/') {
page.context.quicklaunchSlug =
'kr/docs/new-relic-solutions/get-started/quick-launch-guide';
}

if (page.path.match(/404/)) {
page.context.layout = 'basic';
}
Expand Down Expand Up @@ -573,7 +553,7 @@ const createPageFromNode = (
defer = false
) => {
const {
frontmatter: { subject: agentName, hideNavs },
frontmatter: { subject: agentName },
fields: { fileRelativePath, slug },
} = node;

Expand Down Expand Up @@ -621,7 +601,6 @@ const createPageFromNode = (
context: {
...context,
fileRelativePath,
hideNavs,
slug,
slugRegex: `${slug}/.+/`,
disableSwiftype,
Expand Down
Loading

0 comments on commit f655eb5

Please sign in to comment.