Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7fe1ca7

Browse files
committed
Merge branch 'main' into vnext-quickstart
2 parents fa66b1e + 6d24808 commit 7fe1ca7

2,026 files changed

Lines changed: 7786 additions & 6758 deletions

File tree

Some content is hidden

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

.github/workflows/open-enterprise-issue.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,19 @@ jobs:
1414
if: github.repository == 'github/docs-internal'
1515
runs-on: ubuntu-latest
1616
steps:
17+
- name: Checkout repository code
18+
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
19+
20+
- name: Install dependencies
21+
run: npm ci
22+
1723
- name: Check for existing release or deprecation issues
1824
id: existingIssue
1925
run: |
2026
.github/actions-scripts/check-for-enterprise-issues-by-label.js
2127
env:
2228
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2329

24-
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
25-
if: steps.existingIssue.outputs.deprecationIssue == 'false' || steps.existingIssue.outputs.releaseIssue == 'false'
26-
27-
- name: npm ci
28-
if: steps.existingIssue.outputs.deprecationIssue == 'false' || steps.existingIssue.outputs.releaseIssue == 'false'
29-
run: npm ci
30-
31-
- name: npm run build
32-
if: steps.existingIssue.outputs.deprecationIssue == 'false' || steps.existingIssue.outputs.releaseIssue == 'false'
33-
run: npm run build
34-
3530
- name: Update enterprise dates
3631
if: steps.existingIssue.outputs.deprecationIssue == 'false' || steps.existingIssue.outputs.releaseIssue == 'false'
3732
run: |
@@ -43,6 +38,7 @@ jobs:
4338
.github/actions-scripts/create-enterprise-issue.js release
4439
env:
4540
GITHUB_TOKEN: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
41+
4642
- name: Create an enterprise deprecation issue
4743
if: steps.existingIssue.outputs.deprecationIssue == 'false'
4844
run: |
14.8 KB
Loading
124 KB
Loading
35.5 KB
Loading
139 KB
Loading
29.5 KB
Loading

components/SidebarNav.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { useVersion } from './hooks/useVersion'
1010

1111
export const SidebarNav = () => {
1212
const router = useRouter()
13-
const { error, relativePath, isHomepageVersion } = useMainContext()
13+
const { error, relativePath, isFPT } = useMainContext()
1414
const { t } = useTranslation('header')
1515

1616
return (
@@ -39,7 +39,7 @@ export const SidebarNav = () => {
3939
<nav>
4040
{error === '404' || relativePath === 'index.md' ? (
4141
<ul className="sidebar-products mt-4">
42-
{!isHomepageVersion && <AllProductsLink />}
42+
{!isFPT && <AllProductsLink />}
4343
<SidebarHomepage />
4444
</ul>
4545
) : (
@@ -52,7 +52,7 @@ export const SidebarNav = () => {
5252
<style jsx>
5353
{`
5454
.root {
55-
width: 280px;
55+
width: 286px;
5656
height: 100vh;
5757
flex-shrink: 0;
5858
padding-bottom: 32px;
@@ -66,17 +66,17 @@ export const SidebarNav = () => {
6666
const SidebarHomepage = () => {
6767
const router = useRouter()
6868
const { currentVersion } = useVersion()
69-
const { activeProducts, isHomepageVersion } = useMainContext()
69+
const { activeProducts, isFPT } = useMainContext()
7070

7171
return (
7272
<>
7373
{activeProducts.map((product) => {
74-
if (!product.versions?.includes(currentVersion) && !isHomepageVersion) {
74+
if (!isFPT && !product.versions?.includes(currentVersion) && !product.external) {
7575
return null
7676
}
7777

7878
const href = `${!product.external ? `/${router.locale}` : ''}${
79-
product.versions?.includes(currentVersion)
79+
product.versions?.includes(currentVersion) && !isFPT
8080
? `/${currentVersion}/${product.id}`
8181
: product.href
8282
}`

components/article/ArticleVersionPicker.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@ export const ArticleVersionPicker = () => {
3131
</summary>
3232
<Dropdown.Menu direction="sw">
3333
{(page.permalinks || []).map((permalink) => {
34-
if (permalink.pageVersion === 'homepage') {
35-
return null
36-
}
37-
3834
return (
3935
<Dropdown.Item key={permalink.href}>
4036
<Link href={permalink.href}>{permalink.pageVersionTitle}</Link>

components/context/MainContext.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ export type MainContextT = {
7272
currentProduct?: ProductT
7373
currentLayoutName: string
7474
isHomepageVersion: boolean
75+
isFPT: boolean
7576
data: DataT
7677
airGap?: boolean
7778
error: string
@@ -115,7 +116,8 @@ export const getMainContextFromRequest = (req: any): MainContextT => {
115116
activeProducts: req.context.activeProducts,
116117
currentProduct: req.context.productMap[req.context.currentProduct] || null,
117118
currentLayoutName: req.context.currentLayoutName,
118-
isHomepageVersion: req.context.currentVersion === 'homepage',
119+
isHomepageVersion: req.context.page?.documentType === 'homepage',
120+
isFPT: req.context.currentVersion === 'free-pro-team@latest',
119121
error: req.context.error ? req.context.error.toString() : '',
120122
data: {
121123
ui: req.context.site.data.ui,

components/landing/HomepageVersionPicker.tsx

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { ChevronDownIcon } from '@primer/octicons-react'
66
import { Link } from 'components/Link'
77
import { useMainContext } from 'components/context/MainContext'
88
import { useVersion } from 'components/hooks/useVersion'
9-
import { useTranslation } from 'components/hooks/useTranslation'
109

1110
type Props = {
1211
variant?: 'inline'
@@ -15,14 +14,13 @@ export const HomepageVersionPicker = ({ variant }: Props) => {
1514
const router = useRouter()
1615
const { currentVersion } = useVersion()
1716
const { getDetailsProps } = useDetails({})
18-
const { allVersions, page, enterpriseServerVersions, isHomepageVersion } = useMainContext()
19-
const { t } = useTranslation('homepage')
17+
const { allVersions, page, enterpriseServerVersions } = useMainContext()
2018

2119
if (page.permalinks && page.permalinks.length <= 1) {
2220
return null
2321
}
2422

25-
const label = isHomepageVersion ? t('version_picker') : allVersions[currentVersion].versionTitle
23+
const label = allVersions[currentVersion].versionTitle
2624

2725
if (variant === 'inline') {
2826
return (
@@ -35,9 +33,6 @@ export const HomepageVersionPicker = ({ variant }: Props) => {
3533
</summary>
3634
<div>
3735
{(page.permalinks || []).map((permalink) => {
38-
if (permalink.pageVersion === 'homepage') {
39-
return null
40-
}
4136
return (
4237
<Link
4338
key={permalink.href}
@@ -78,10 +73,6 @@ export const HomepageVersionPicker = ({ variant }: Props) => {
7873
</summary>
7974
<Dropdown.Menu direction="sw">
8075
{(page.permalinks || []).map((permalink) => {
81-
if (permalink.pageVersion === 'homepage') {
82-
return null
83-
}
84-
8576
return (
8677
<Dropdown.Item key={permalink.href}>
8778
<Link href={permalink.href}>{permalink.pageVersionTitle}</Link>

0 commit comments

Comments
 (0)