Skip to content

Commit 9ab6911

Browse files
authored
Merge branch 'main' into use-consistant-wording-for-github-dot-com
2 parents edcf908 + 3b1aa1d commit 9ab6911

File tree

770 files changed

+3152879
-746037
lines changed

Some content is hidden

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

770 files changed

+3152879
-746037
lines changed

.github/actions-scripts/enterprise-server-issue-templates/deprecation-issue.md

Lines changed: 65 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ The day after a GHES version's [deprecation date](https://github.com/github/docs
66

77
The following large repositories are used throughout this checklist, it may be useful to clone them before you begin:
88

9-
- `github/help-docs-archived-enterprise-versions`
109
- `github/github`
1110
- `github/docs-internal`
1211

@@ -18,46 +17,85 @@ Additionally, you may want to download:
1817

1918
**Note**: This step can be performed independently of all other steps, and can be done several days before or along with the other steps.
2019

21-
- [ ] In the `docs-content` repo, remove the deprecated GHES version number from the "Specific GHES version(s)" section in the following files (in the `.github/ISSUE_TEMPLATE/` directory): [`release-tier-1-or-2-tracking.yml`](https://github.com/github/docs-content/blob/main/.github/ISSUE_TEMPLATE/release-tier-1-or-2-tracking.yml) and [`release-tier-3-or-tier-4.yml`](https://github.com/github/docs-content/blob/main/.github/ISSUE_TEMPLATE/release-tier-3-or-tier-4.yml).
20+
- [ ] In the `docs-content` repo, remove the deprecated GHES version number from the `options` list in the following files (in the `.github/ISSUE_TEMPLATE/` directory): [`release-tier-1-or-2-tracking.yml`](https://github.com/github/docs-content/blob/main/.github/ISSUE_TEMPLATE/release-tier-1-or-2-tracking.yml) and [`release-tier-3-or-tier-4.yml`](https://github.com/github/docs-content/blob/main/.github/ISSUE_TEMPLATE/release-tier-3-or-tier-4.yml).
2221
- [ ] When the PR is approved, merge it in. This can be merged independently from all other steps.
2322

2423
## Step 1: Scrape the docs and archive the files
2524

26-
- [ ] In your checkout of the [repo with archived GHES content](https://github.com/github/help-docs-archived-enterprise-versions), create a new branch: `git checkout -b deprecate-<version>`
2725
- [ ] In your `docs-internal` checkout, download the static files for the oldest supported version into your archival checkout:
2826
The archive script depends on an optional dependency so install optional dependencies first:
2927
```
30-
$ npm i --include-optional
28+
$ npm i --include=optional
3129
```
3230
Ensure your build is up to date:
3331
```
3432
$ npm run build
3533
```
3634
Then run the archive script:
3735
```
38-
$ script/enterprise-server-deprecations/archive-version.js -p <path-to-archive-repo-checkout>
36+
$ script/enterprise-server-deprecations/archive-version.js
3937
```
40-
If your checkouts live in the same directory, this command would be:
38+
39+
This will generate a directory in `github/docs-internal` called `tmpArchivalDir_<VERSION_TO_DEPRECATE>`. For example 'tmpArchivalDir_3.0'. You can also create a specific output directory using the `--output` flag.
40+
41+
**Note:** You can pass the `--dry-run` flag to scrape only the first 10 pages plus their redirects for testing purposes. **If you use the dry run command, be sure to run the full script without `--dry-run` before you commit the changes.**
42+
43+
## Step 3: Manually remove the search input from the archived docs
44+
45+
- [ ] Search for `site-search-input` in the compressed Javascript files (should find the file in the `_next` directory). When you find it, use something like https://beautifier.io/ or VSCode to reformat it to be readable. To reformat using VSCode, use the "Format document" option or <kbd>Shift</kbd>+<kbd>Option</kbd>+<kbd>F</kbd>. Find `site-search-input` in the file, the result will be enclosed in a function that looks something like... `(0,f.jsx)("input",{"data-testid":"site-search-input",` Delete the entire function. For example, this:
4146
```
42-
$ script/enterprise-server-deprecations/archive-version.js -p ../help-docs-archived-enterprise-versions
47+
(0, f.jsxs)("label", {
48+
className: "text-normal width-full",
49+
children: [(0, f.jsx)("span", {
50+
className: "visually-hidden",
51+
"aria-label": R($ || ($ = (0, k.Z)(["label"]))),
52+
"aria-describedby": R(W || (W = (0, k.Z)(["description"]))),
53+
children: R(U || (U = (0, k.Z)(["placeholder"])))
54+
}), (0, f.jsx)("input", {
55+
"data-testid": "site-search-input",
56+
ref: I,
57+
className: h()(pe().searchInput, 24 === p && pe().searchIconBackground24, 24 === p && "form-control px-6 f4", 16 === p && pe().searchIconBackground16, 16 === p && "form-control px-5 f4", "compact" === i && "py-2", "expanded" === i && "py-3", r && pe().searchInputHeader, !r && "width-full", r && j && pe().searchInputExpanded, r && j && "position-absolute top-0 right-0"),
58+
type: "search",
59+
placeholder: R(G || (G = (0, k.Z)(["placeholder"]))),
60+
autoComplete: _ ? "on" : "off",
61+
autoCorrect: "off",
62+
autoCapitalize: "off",
63+
spellCheck: "false",
64+
maxLength: 512,
65+
onChange: function(e) {
66+
S(e.target.value)
67+
},
68+
value: _,
69+
"aria-label": R(K || (K = (0, k.Z)(["label"]))),
70+
"aria-describedby": R(J || (J = (0, k.Z)(["description"])))
71+
})
4372
```
44-
**Note:** You can pass the `--dry-run` flag to scrape only the first 10 pages plus their redirects for testing purposes. **If you use the dry run command, be sure to run the full script without `--dry-run` before you commit the changes.**
4573

46-
## Step 2: Upload the assets directory to Azure storage
74+
becomes:
75+
76+
```
77+
(0, f.jsxs)('label', {
78+
className: 'text-normal width-full',
79+
children: [
80+
(0, f.jsx)('span', {
81+
className: 'visually-hidden',
82+
'aria-label': y(Q || (Q = (0, k.Z)(['label']))),
83+
'aria-describedby': y(X || (X = (0, k.Z)(['description']))),
84+
children: y(ee || (ee = (0, k.Z)(['placeholder']))),
85+
}),
86+
],
87+
}),
88+
```
89+
- [ ] Save the file. If using beautifier, copy and paste the updated file back into your temp directory with the scraped archive content.
90+
91+
## Step 2: Upload the scraped content directory to Azure storage
4792

4893
- [ ] Log in to the Azure portal from Okta. Navigate to the [githubdocs Azure Storage Blob resource](https://portal.azure.com/#@githubazure.onmicrosoft.com/resource/subscriptions/fa6134a7-f27e-4972-8e9f-0cedffa328f1/resourceGroups/docs-production/providers/Microsoft.Storage/storageAccounts/githubdocs/overview).
4994
- [ ] Click the "Open in Explorer" button to the right of search box. If you haven't already, click the download link to download "Microsoft Azure Storage Explorer." To login to the app, click the plug icon in the left sidebar and click the option to "add an azure account." When you login, you'll need a yubikey to authenticate through Okta.
50-
- [ ] From the Microsoft Azure Storage Explorer app, select the `githubdocs` storage account resource and navigate to the `github-images` blob container.
51-
- [ ] Click "Upload" and select "Upload folder." Click the "Selected folder" input to navigate to the `help-docs-archived-enterprise-versions` repository and select the `assets` directory for the version you just generated. In the "Destination directory" input, add the version number. For example, `/enterprise/2.22/`.
95+
- [ ] From the Microsoft Azure Storage Explorer app, select the `githubdocs` storage account resource and navigate to the `enterprise` blob container.
96+
- [ ] Click "Upload" and select "Upload folder." Click the "Selected folder" input to navigate to the temp directory you just generated. Inside that temp directory, select the `<VERSION_TO_DEPRECATE>` directory (e.g., `3.2`). Leave the destination directory input blank.
5297
- [ ] Check the log to ensure all files were uploaded successfully.
53-
- [ ] Remove the `assets` directory from your `help-docs-archived-enterprise-versions` repository, we don't want to commit that directory in the next step.
54-
55-
## Step 3: Commit and push changes to help-docs-archived-enterprise-versions repo
56-
57-
- [ ] Search for `site-search-input` in the compressed Javascript files (should find the file in the `_next` directory). When you find it, use something like https://beautifier.io/ or VSCode to reformat it to be readable. To reformat using VSCode, use the "Format document" option or <kbd>Shift</kbd>+<kbd>Option</kbd>+<kbd>F</kbd>. Find `site-search-input` in the file, the result will be enclosed in a function that looks something like... `1125: function () { ... },` Delete the innards of this function, but leave the `function() {}` part.
58-
- [ ] Save the file. If using beautifier, copy and paste the updated file back into your local `help-docs-archived-enterprise-versions` repository.
59-
- [ ] In your archival checkout, `git add <version>`, commit, and push.
60-
- [ ] Open a PR and merge it in. Note that the version will _not_ be deprecated on the docs site until you do the next step.
98+
- [ ] Remove the temporarily created directory from your `github/docs-internal` checkout.
6199

62100
## Step 4: Deprecate the version in docs-internal
63101

@@ -71,22 +109,13 @@ In your `docs-internal` checkout:
71109
You can test that the static pages were generated correctly on localhost and on staging. Verify that the static pages are accessible by running `npm run dev` in your local `docs-internal` checkout and navigate to:
72110
`http://localhost:3000/enterprise/<version>/`.
73111

74-
Note: the GitHub Pages deployment from the previous step will need to have completed successfully in order for you to test this. You may need to wait up to 10 minutes for this to occur.
75-
76112
Poke around several pages, ensure that the stylesheets are working properly, images are rendering properly, and that the search functionality was disabled.
77113

78-
## Step 5: Continue to deprecate the version in docs-internal
79-
80-
- [ ] Open a new PR. Make sure to check the following:
81-
- [ ] Tests are passing (you may need to include the changes in step 6 to get tests to pass).
82-
- [ ] The deprecated version renders in preview as expected. You should be able to navigate to `docs.github.com/enterprise/<DEPRECATED VERSION>` to access the docs. You should also be able to navigate to a page that is available in the deprecated version and change the version in the URL to the deprecated version, to test redirects.
83-
- [ ] The new oldest supported version renders on staging as expected. You should see a banner on the top of every page for the oldest supported version that notes when the version will be deprecated.
84-
85114
## Step 5: Remove static files for the version
86115

87116
- [ ] In your `docs-internal` checkout, create a new branch `remove-<version>-static-files` branch: `git checkout -b remove-<version>-static-files` (you can branch off of `main` or from your `deprecate-<version>` branch, up to you).
88117
- [ ] Run `script/enterprise-server-deprecations/remove-static-files.js` and commit results.
89-
- [ ] Run `script/enterprise-server-deprecations/remove-redirects.js` and commit results.
118+
- [ ] Re-generate the static files by running `script/rest/update-files.js --decorate-only`.
90119
- [ ] Open a new PR.
91120
- [ ] Get a review from docs-engineering and merge. This step can be merged independently from step 6. The purpose of splitting up steps 5 and 6 is to focus the review on specific files.
92121

@@ -107,3 +136,10 @@ Poke around several pages, ensure that the stylesheets are working properly, ima
107136
- [ ] When the PR is approved, [deploy the `github/github` PR](https://thehub.github.com/epd/engineering/devops/deployment/deploying-dotcom/). If you haven't deployed a `github/github` PR before, work with someone that has -- the process isn't too involved depending on how you deploy, but there are a lot of details that can potentially be confusing as you can see from the documentation.
108137

109138
**Note**: you can do this step independently of the other steps after a GHES version is deprecated since it should no longer get updates in github/github. You should plan to get this PR merged as soon as possible, otherwise if you wait too long our OpenAPI automation may re-add the static files that you removed in step 5.
139+
140+
## Step 5: Continue to deprecate the version in docs-internal
141+
142+
- [ ] Open a new PR. Make sure to check the following:
143+
- [ ] Tests are passing (you may need to include the changes in step 6 to get tests to pass).
144+
- [ ] The deprecated version renders in preview as expected. You should be able to navigate to `docs.github.com/enterprise/<DEPRECATED VERSION>` to access the docs. You should also be able to navigate to a page that is available in the deprecated version and change the version in the URL to the deprecated version, to test redirects.
145+
- [ ] The new oldest supported version renders on staging as expected. You should see a banner on the top of every page for the oldest supported version that notes when the version will be deprecated.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# GitHub Docs <!-- omit in toc -->
2-
2+
33
This repository contains the documentation website code and Markdown source files for [docs.github.com](https://docs.github.com).
44

55
GitHub's Docs team works on pre-production content in a private repo that regularly syncs with this public repo.
Loading
Loading
Loading
Loading
Loading
Loading

components/context/ProductLandingContext.tsx

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export type ProductLandingContextT = {
3939
beta_product: boolean
4040
product: Product
4141
introLinks: Record<string, string> | null
42-
product_video?: string
42+
productVideo: string
4343
featuredLinks: Record<string, Array<FeaturedLink>>
4444
productCodeExamples: Array<CodeExample>
4545
productUserExamples: Array<{ username: string; description: string }>
@@ -93,19 +93,20 @@ export const getFeaturedLinksFromReq = (req: any): Record<string, Array<Featured
9393
)
9494
}
9595

96-
export const getProductLandingContextFromRequest = (req: any): ProductLandingContextT => {
96+
export const getProductLandingContextFromRequest = async (
97+
req: any
98+
): Promise<ProductLandingContextT> => {
9799
const productTree = req.context.currentProductTree
98100
const page = req.context.page
99101
const hasGuidesPage = (page.children || []).includes('/guides')
102+
103+
const productVideo = page.product_video
104+
? await page.renderProp('product_video', req.context, { textOnly: true })
105+
: ''
106+
100107
return {
101-
...pick(page, [
102-
'title',
103-
'shortTitle',
104-
'introPlainText',
105-
'beta_product',
106-
'intro',
107-
'product_video',
108-
]),
108+
...pick(page, ['title', 'shortTitle', 'introPlainText', 'beta_product', 'intro']),
109+
productVideo,
109110
hasGuidesPage,
110111
product: {
111112
href: productTree.href,

components/landing/LandingHero.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { useVersion } from 'components/hooks/useVersion'
1010
import { Lead } from 'components/ui/Lead'
1111

1212
export const LandingHero = () => {
13-
const { product_video, shortTitle, title, beta_product, intro, introLinks } =
13+
const { productVideo, shortTitle, title, beta_product, intro, introLinks } =
1414
useProductLandingContext()
1515
const { t } = useTranslation('product_landing')
1616
const [renderIFrame, setRenderIFrame] = useState(false)
@@ -22,7 +22,7 @@ export const LandingHero = () => {
2222

2323
return (
2424
<header className="d-lg-flex gutter-lg mb-6">
25-
<div className={cx('col-12 mb-3 mb-lg-0', product_video && 'col-lg-6')}>
25+
<div className={cx('col-12 mb-3 mb-lg-0', productVideo && 'col-lg-6')}>
2626
<h1>
2727
{shortTitle || title}{' '}
2828
{beta_product && <span className="Label Label--success v-align-middle">Beta</span>}
@@ -51,13 +51,13 @@ export const LandingHero = () => {
5151
})}
5252
</div>
5353

54-
{product_video && (
54+
{productVideo && (
5555
<div className="col-12 col-lg-6">
5656
<div className="position-relative" style={{ paddingBottom: '56.25%' }}>
5757
<iframe
5858
title={`${shortTitle} Video`}
5959
className="top-0 left-0 position-absolute color-shadow-large rounded-1 width-full height-full"
60-
src={renderIFrame ? product_video : ''}
60+
src={renderIFrame ? productVideo : ''}
6161
frameBorder="0"
6262
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
6363
allowFullScreen

content/account-and-profile/managing-subscriptions-and-notifications-on-github/viewing-and-triaging-notifications/managing-notifications-from-your-inbox.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ For example, to see notifications from the octo-org organization, use `org:octo-
161161

162162
## {% data variables.product.prodname_dependabot %} custom filters
163163

164-
{% ifversion fpt or ghec or ghes > 3.2 %}
164+
{% ifversion fpt or ghec or ghes %}
165165
If you use {% data variables.product.prodname_dependabot %} to keep your dependencies up-to-date, you can use and save these custom filters:
166166
- `is:repository_vulnerability_alert` to show notifications for {% data variables.product.prodname_dependabot_alerts %}.
167167
- `reason:security_alert` to show notifications for {% data variables.product.prodname_dependabot_alerts %} and security update pull requests.
@@ -170,7 +170,7 @@ If you use {% data variables.product.prodname_dependabot %} to keep your depende
170170
For more information about {% data variables.product.prodname_dependabot %}, see "[About {% data variables.product.prodname_dependabot_alerts %}](/code-security/supply-chain-security/about-alerts-for-vulnerable-dependencies)."
171171
{% endif %}
172172

173-
{% ifversion ghes < 3.3 or ghae %}
173+
{% ifversion ghae %}
174174

175175
If you use {% data variables.product.prodname_dependabot %} to tell you about insecure dependencies, you can use and save these custom filters to show notifications for {% data variables.product.prodname_dependabot_alerts %}:
176176
- `is:repository_vulnerability_alert`

content/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/about-your-organizations-profile.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Organizations that use {% data variables.product.prodname_ghe_cloud %} can confi
2424
To confirm your organization's identity and display a "Verified" badge on your organization profile page, you can verify your organization's domains with {% data variables.product.prodname_dotcom %}. For more information, see "[Verifying or approving a domain for your organization](/organizations/managing-organization-settings/verifying-or-approving-a-domain-for-your-organization)."
2525
{% endif %}
2626

27-
{% ifversion fpt or ghes > 3.2 or ghec %}
27+
{% ifversion fpt or ghes or ghec %}
2828
![Sample organization profile page](/assets/images/help/organizations/org_profile_with_overview.png)
2929
{% else %}
3030
![Sample organization profile page](/assets/images/help/profile/org_profile.png)

content/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/about-your-profile.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ People who visit your profile see a timeline of your contribution activity, like
3030
People who visit your profile can also see the following information.
3131

3232
- Repositories and gists you own or contribute to. {% ifversion fpt or ghes or ghec %}You can showcase your best work by pinning repositories and gists to your profile. For more information, see "[Pinning items to your profile](/github/setting-up-and-managing-your-github-profile/pinning-items-to-your-profile)."{% endif %}
33-
- Repositories you've starred{% ifversion fpt or ghec %} and organized into lists.{% endif %} For more information, see "[Saving repositories with stars](/articles/saving-repositories-with-stars/)."
33+
- Repositories you've starred{% ifversion fpt or ghec %} and organized into lists{% endif %}. For more information, see "[Saving repositories with stars](/articles/saving-repositories-with-stars/)."
3434
- An overview of your activity in organizations, repositories, and teams you're most active in. For more information, see "[Showing an overview of your activity on your profile](/articles/showing-an-overview-of-your-activity-on-your-profile)."{% ifversion fpt or ghec %}
3535
- Badges and Achievements that highlight your activity and show if you use {% data variables.product.prodname_pro %} or participate in programs like the {% data variables.product.prodname_arctic_vault %}, {% data variables.product.prodname_sponsors %}, or the {% data variables.product.company_short %} Developer Program. For more information, see "[Personalizing your profile](/github/setting-up-and-managing-your-github-profile/personalizing-your-profile#displaying-badges-on-your-profile)."{% endif %}
3636

0 commit comments

Comments
 (0)