Skip to content

Commit 6567a3b

Browse files
Merge branch 'main' into bo/docs-batch-changes-bitbucket-oauth
2 parents 5be514b + f04687a commit 6567a3b

3 files changed

Lines changed: 6 additions & 27 deletions

File tree

docs/batch-changes/index.mdx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ seoPriority: 1.0
99
</TierCallout>
1010

1111
<p className="subtitle">
12-
This section is about Batch Changes, which helps you automate and ship
13-
large-scale code changes across many repositories and code hosts.
12+
Learn how to automate and ship large-scale code changes across many repositories and code hosts.
1413
</p>
1514

1615
Batch Changes helps you ship large-scale code changes across many repositories and code hosts. You can create pull requests on all affected repositories, and it tracks their progress until they're all merged. You can also preview the changes and update them at any time.
@@ -29,7 +28,7 @@ Batch Changes helps you ship large-scale code changes across many repositories a
2928
/>
3029
</video>
3130

32-
## Get Started
31+
## Getting Started
3332

3433
<QuickLinks>
3534
<QuickLink
@@ -88,7 +87,7 @@ You can see the overall trend of a batch change in the burndown chart, which sho
8887

8988
![batch-changes-charts](https://storage.googleapis.com/sourcegraph-assets/Docs/bc-charts-062024.png)
9089

91-
You can also [create a batch change on a monorepo](/batch-changes/creating-changesets-per-project-in-monorepos) by specifying which projects to run the script on. A batch change can also be used to track and manage manually created changesets.
90+
You can also [create a batch change on a monorepo](/batch-changes/creating-changesets-per-project-in-monorepos) by specifying which projects to run the script on. A batch change can also be used to [track and manage manually created changesets](/batch-changes/tracking-existing-changesets).
9291

9392
## Supported code hosts and changeset types
9493

src/app/robots.ts

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,11 @@
11
import {MetadataRoute} from 'next';
2-
import {headers} from 'next/headers';
32

43
export default async function robots(): Promise<MetadataRoute.Robots> {
5-
const headersList = await headers();
6-
const host = headersList.get('host') || 'sourcegraph.com';
7-
const protocol = host.includes('localhost') ? 'http' : 'https';
8-
const docsPath = host === 'sourcegraph.com' ? '/docs' : '';
9-
const baseUrl = `${protocol}://${host}${docsPath}`;
10-
11-
const vercelEnv = process.env.VERCEL_ENV;
12-
// Only allow robots for the latest version (and local dev), the versioned
13-
// historic docs pages should not be crawled by search engines.
14-
const allowRobots =
15-
(vercelEnv === 'production' && host === 'sourcegraph.com') ||
16-
vercelEnv === undefined;
17-
184
return {
195
rules: {
206
userAgent: '*',
21-
allow: allowRobots ? '/' : undefined,
22-
disallow: allowRobots ? undefined : '/'
7+
allow: '/'
238
},
24-
sitemap: allowRobots ? `${baseUrl}/sitemap.xml` : undefined
9+
sitemap: 'https://sourcegraph.com/docs/sitemap.xml'
2510
};
2611
}

src/app/sitemap.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
import {MetadataRoute} from 'next';
2-
import {headers} from 'next/headers';
32
import {allPosts} from 'contentlayer/generated';
43

54
export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
6-
const headersList = await headers();
7-
const host = headersList.get('host') || 'sourcegraph.com';
8-
const protocol = host.includes('localhost') ? 'http' : 'https';
9-
const docsPath = host === 'sourcegraph.com' ? '/docs' : '';
10-
const baseUrl = `${protocol}://${host}${docsPath}`;
5+
const baseUrl = 'https://sourcegraph.com/docs';
116

127
const links: MetadataRoute.Sitemap = [
138
{

0 commit comments

Comments
 (0)