Skip to content

Commit 1065c1e

Browse files
authored
Merge branch 'main' into typo1
2 parents 2f301b0 + 03da375 commit 1065c1e

File tree

440 files changed

+2776
-3125
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

440 files changed

+2776
-3125
lines changed

.devcontainer/ruby-environment/devcontainer.json

Lines changed: 0 additions & 42 deletions
This file was deleted.

.devcontainer/xxtest-devcontainer.json

Lines changed: 0 additions & 42 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ Click **Make a contribution** at the bottom of any docs page to make small chang
4242

4343
<img src="./assets/images/contribution_cta.png" width="300" height="150" />
4444

45+
#### Make changes in a codespace
46+
47+
For more information about using a codespace for working on GitHub documentation, see "[Working in a codespace](https://github.com/github/docs/blob/main/contributing/codespace.md)."
48+
4549
#### Make changes locally
4650

4751
1. [Install Git LFS](https://docs.github.com/en/github/managing-large-files/versioning-large-files/installing-git-large-file-storage).
@@ -54,9 +58,6 @@ Click **Make a contribution** at the bottom of any docs page to make small chang
5458
- Using the command line:
5559
- [Fork the repo](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo#fork-an-example-repository) so that you can make your changes without affecting the original project until you're ready to merge them.
5660

57-
- GitHub Codespaces:
58-
- [Fork, edit, and preview](https://docs.github.com/en/free-pro-team@latest/github/developing-online-with-codespaces/creating-a-codespace) using [GitHub Codespaces](https://github.com/features/codespaces) without having to install and run the project locally.
59-
6061
3. Install or update to **Node.js v16**. For more information, see [the development guide](contributing/development.md).
6162

6263
4. Create a working branch and start with your changes!
Loading
28 KB
Loading
Loading
-6.76 KB
Loading
Loading

components/context/ProductLandingContext.tsx

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,7 @@ export type ProductLandingContextT = {
3838
intro: string
3939
beta_product: boolean
4040
product: Product
41-
introLinks: {
42-
quickstart?: string
43-
reference?: string
44-
overview?: string
45-
} | null
41+
introLinks: Record<string, string> | null
4642
product_video?: string
4743
featuredLinks: Record<string, Array<FeaturedLink>>
4844
productCodeExamples: Array<CodeExample>
@@ -128,13 +124,7 @@ export const getProductLandingContextFromRequest = (req: any): ProductLandingCon
128124
})
129125
),
130126

131-
introLinks: page.introLinks
132-
? {
133-
quickstart: page.introLinks.quickstart,
134-
reference: page.introLinks.reference,
135-
overview: page.introLinks.overview,
136-
}
137-
: null,
127+
introLinks: page.introLinks || null,
138128

139129
featuredLinks: getFeaturedLinksFromReq(req),
140130

components/landing/LandingHero.tsx

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import { useEffect, useState } from 'react'
22
import cx from 'classnames'
33
import { useRouter } from 'next/router'
4-
import { useMainContext } from 'components/context/MainContext'
4+
import { LinkExternalIcon } from '@primer/octicons-react'
55

6+
import { useMainContext } from 'components/context/MainContext'
67
import { Link } from 'components/Link'
78
import { useProductLandingContext } from 'components/context/ProductLandingContext'
89
import { useTranslation } from 'components/hooks/useTranslation'
@@ -46,7 +47,7 @@ export const LandingHero = () => {
4647
href={link}
4748
className={cx('btn btn-large f4 mt-3 mr-3 ', i === 0 && 'btn-primary')}
4849
>
49-
{t(key)}
50+
{t(key) || key}
5051
</FullLink>
5152
)
5253
})}
@@ -72,7 +73,8 @@ export const LandingHero = () => {
7273
)
7374
}
7475

75-
// Fully Qualified Link - it includes the version and locale in the path
76+
// Fully Qualified Link - it includes the version and locale in the path if
77+
// the href is not an external link.
7678
type Props = {
7779
href: string
7880
children: React.ReactNode
@@ -81,13 +83,24 @@ type Props = {
8183
export const FullLink = ({ href, children, className }: Props) => {
8284
const router = useRouter()
8385
const { currentVersion } = useVersion()
84-
const locale = router.locale || 'en'
85-
const fullyQualifiedHref = `/${locale}${
86-
currentVersion !== 'free-pro-team@latest' ? `/${currentVersion}` : ''
87-
}${href}`
86+
87+
const isExternal = href.startsWith('https')
88+
let linkHref = href
89+
if (!isExternal) {
90+
const locale = router.locale || 'en'
91+
linkHref = `/${locale}${
92+
currentVersion !== 'free-pro-team@latest' ? `/${currentVersion}` : ''
93+
}${href}`
94+
}
95+
8896
return (
89-
<Link href={fullyQualifiedHref} className={className}>
90-
{children}
97+
<Link href={linkHref} className={className}>
98+
{children}{' '}
99+
{isExternal && (
100+
<span className="ml-1">
101+
<LinkExternalIcon size="small" />
102+
</span>
103+
)}
91104
</Link>
92105
)
93106
}

components/playground/content/actions/guides/building-and-testing-nodejs-or-python/nodejs.tsx

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,9 @@ const article: PlaygroundArticleT = {
242242
node-version: [10.x, 12.x, 14.x, 15.x]
243243
244244
steps:
245-
- uses: actions/checkout@v2
245+
- uses: actions/checkout@v3
246246
- name: Use Node.js \${{ matrix.node-version }}
247-
uses: actions/setup-node@v2
247+
uses: actions/setup-node@v3
248248
with:
249249
node-version: \${{ matrix.node-version }}
250250
- name: Install dependencies
@@ -275,9 +275,9 @@ const article: PlaygroundArticleT = {
275275
node-version: [8.16.2, 10.17.0]
276276
277277
steps:
278-
- uses: actions/checkout@v2
278+
- uses: actions/checkout@v3
279279
- name: Use Node.js \${{ matrix.node-version }}
280-
uses: actions/setup-node@v2
280+
uses: actions/setup-node@v3
281281
with:
282282
node-version: \${{ matrix.node-version }}
283283
- name: Install dependencies
@@ -304,9 +304,9 @@ const article: PlaygroundArticleT = {
304304
runs-on: ubuntu-latest
305305
306306
steps:
307-
- uses: actions/checkout@v2
307+
- uses: actions/checkout@v3
308308
- name: Use Node.js
309-
uses: actions/setup-node@v1
309+
uses: actions/setup-node@v3
310310
with:
311311
node-version: '12.x'
312312
- name: Install dependencies
@@ -333,9 +333,9 @@ const article: PlaygroundArticleT = {
333333
runs-on: ubuntu-latest
334334
335335
steps:
336-
- uses: actions/checkout@v2
336+
- uses: actions/checkout@v3
337337
- name: Use Node.js
338-
uses: actions/setup-node@v1
338+
uses: actions/setup-node@v3
339339
with:
340340
node-version: '12.x'
341341
- name: Install dependencies
@@ -362,9 +362,9 @@ const article: PlaygroundArticleT = {
362362
runs-on: ubuntu-latest
363363
364364
steps:
365-
- uses: actions/checkout@v2
365+
- uses: actions/checkout@v3
366366
- name: Use Node.js
367-
uses: actions/setup-node@v1
367+
uses: actions/setup-node@v3
368368
with:
369369
node-version: '12.x'
370370
- name: Install dependencies
@@ -391,9 +391,9 @@ const article: PlaygroundArticleT = {
391391
runs-on: ubuntu-latest
392392
393393
steps:
394-
- uses: actions/checkout@v2
394+
- uses: actions/checkout@v3
395395
- name: Use Node.js
396-
uses: actions/setup-node@v1
396+
uses: actions/setup-node@v3
397397
with:
398398
node-version: '12.x'
399399
- name: Install dependencies
@@ -420,9 +420,9 @@ const article: PlaygroundArticleT = {
420420
runs-on: ubuntu-latest
421421
422422
steps:
423-
- uses: actions/checkout@v2
423+
- uses: actions/checkout@v3
424424
- name: Use Node.js
425-
uses: actions/setup-node@v1
425+
uses: actions/setup-node@v3
426426
with:
427427
node-version: '12.x'
428428
- name: Install dependencies
@@ -450,9 +450,9 @@ const article: PlaygroundArticleT = {
450450
runs-on: ubuntu-latest
451451
452452
steps:
453-
- uses: actions/checkout@v2
453+
- uses: actions/checkout@v3
454454
- name: Use Node.js
455-
uses: actions/setup-node@v1
455+
uses: actions/setup-node@v3
456456
with:
457457
always-auth: true
458458
node-version: '12.x'
@@ -492,9 +492,9 @@ const article: PlaygroundArticleT = {
492492
runs-on: ubuntu-latest
493493
494494
steps:
495-
- uses: actions/checkout@v2
495+
- uses: actions/checkout@v3
496496
- name: Use Node.js
497-
uses: actions/setup-node@v1
497+
uses: actions/setup-node@v3
498498
with:
499499
node-version: '12.x'
500500
cache: 'npm'
@@ -520,9 +520,9 @@ const article: PlaygroundArticleT = {
520520
runs-on: ubuntu-latest
521521
522522
steps:
523-
- uses: actions/checkout@v2
523+
- uses: actions/checkout@v3
524524
- name: Use Node.js
525-
uses: actions/setup-node@v1
525+
uses: actions/setup-node@v3
526526
with:
527527
node-version: '12.x'
528528
- run: npm install

0 commit comments

Comments
 (0)