diff --git a/.agents/skills/publishing-docs-versions/SKILL.md b/.agents/skills/publishing-docs-versions/SKILL.md
index 2661f93a0..9ac05eb9b 100644
--- a/.agents/skills/publishing-docs-versions/SKILL.md
+++ b/.agents/skills/publishing-docs-versions/SKILL.md
@@ -18,7 +18,6 @@ Use this skill for the Sourcegraph docs repo release-version workflow: cutting l
- The files that control latest/previous versions are:
- `docs.config.js`
- `src/data/versions.ts`
- - `docs/legacy.mdx`
- `src/data/versions.ts` on `origin/main` is the canonical dropdown list. The
current site exposes it through `/docs/api/versions`, and legacy selectors
load that manifest at runtime.
@@ -78,12 +77,11 @@ For `v7_3`, for example:
- `docs.config.js`: `DOCS_LATEST_VERSION: '7.3'`
- `src/data/versions.ts`: first entry identifies `v7.3` without a `latest`
label; fallback entries should include `v7.2`, `v7.1`, `v7.0`, then 6.x.
-- `docs/legacy.mdx`: `Sourcegraph 7.X` should include `7.2`, `7.1`, `7.0` (not 7.3 itself).
Commit and push:
```bash
-git add docs.config.js src/data/versions.ts docs/legacy.mdx
+git add docs.config.js src/data/versions.ts
git commit -m "Update docs latest version to X.Y"
git push legacy vX_Y
```
@@ -104,18 +102,16 @@ For `7.4`, for example:
- `docs.config.js`: `DOCS_LATEST_VERSION: '7.4'`
- `src/data/versions.ts`: add previous versions in descending order: `v7.3`, `v7.2`, `v7.1`, `v7.0`, then 6.x.
-- `docs/legacy.mdx`: add/update `Sourcegraph 7.X` with `7.3`, `7.2`, `7.1`, `7.0`.
Commit, push the branch, and open a PR:
```bash
-git add docs.config.js src/data/versions.ts docs/legacy.mdx
+git add docs.config.js src/data/versions.ts
git commit -m "Update docs latest version to X.Y"
git push -u origin eg-update-docs-to-X-Y
gh pr create --base main --head eg-update-docs-to-X-Y --title "Update docs latest version to X.Y" --body "## Summary
- Set DOCS_LATEST_VERSION to X.Y
- Add previous 7.x versions to the version selector
-- Update the legacy versions page
## Test plan
- Not run (config/navigation content change only)"
@@ -126,7 +122,7 @@ gh pr create --base main --head eg-update-docs-to-X-Y --title "Update docs lates
Use lightweight verification for this content/config change:
```bash
-git diff -- docs.config.js src/data/versions.ts docs/legacy.mdx
+git diff -- docs.config.js src/data/versions.ts
git status --short --branch
git ls-remote --heads legacy 'v7_*'
```
diff --git a/dev/algolia-index.mjs b/dev/algolia-index.mjs
index 9f6cb295d..95b766604 100644
--- a/dev/algolia-index.mjs
+++ b/dev/algolia-index.mjs
@@ -73,7 +73,6 @@ const FALLBACK_PRODUCTS = [
{prefix: '/how-to', product: 'How-to guides', section: 'Documentation'},
{prefix: '/dotcom', product: 'Sourcegraph.com', section: 'Documentation'},
{prefix: '/releases', product: 'Releases', section: 'Documentation'},
- {prefix: '/legacy', product: 'Legacy', section: 'Documentation'},
{prefix: '/pricing', product: 'Pricing', section: 'Resources'}
];
diff --git a/docs/legacy.mdx b/docs/legacy.mdx
deleted file mode 100644
index ff7b401b4..000000000
--- a/docs/legacy.mdx
+++ /dev/null
@@ -1,90 +0,0 @@
-# Legacy Versions
-
-
- Find versioned documentation for previous versions of Sourcegraph below.
-
-
-
-
-- [7.7](https://7.7.sourcegraph.com)
-- [7.6](https://7.6.sourcegraph.com)
-- [7.5](https://7.5.sourcegraph.com)
-- [7.4](https://7.4.sourcegraph.com)
-- [7.3](https://7.3.sourcegraph.com)
-- [7.2](https://7.2.sourcegraph.com)
-- [7.1](https://7.1.sourcegraph.com)
-- [7.0](https://7.0.sourcegraph.com)
-
-
-
-
-
-- [6.12](https://6.12.sourcegraph.com)
-- [6.11](https://6.11.sourcegraph.com)
-- [6.10](https://6.10.sourcegraph.com)
-- [6.9](https://6.9.sourcegraph.com)
-- [6.8](https://6.8.sourcegraph.com)
-- [6.7](https://6.7.sourcegraph.com)
-- [6.6](https://6.6.sourcegraph.com)
-- [6.5](https://6.5.sourcegraph.com)
-- [6.4](https://6.4.sourcegraph.com)
-- [6.3](https://6.3.sourcegraph.com)
-- [6.2](https://6.2.sourcegraph.com)
-- [6.1](https://6.1.sourcegraph.com)
-- [6.0](https://6.0.sourcegraph.com)
-
-
-
-
-
-- [5.11](https://5.11.sourcegraph.com/)
-- [5.10](https://5.10.sourcegraph.com/)
-- [5.9](https://5.9.sourcegraph.com/)
-- [5.8](https://5.8.sourcegraph.com/)
-- [5.7](https://5.7.sourcegraph.com/)
-- [5.6](https://5.6.sourcegraph.com/)
-- [5.5](https://5.5.sourcegraph.com/)
-- [5.4](https://5.4.sourcegraph.com)
-- [5.3](https://5.3.sourcegraph.com/)
-- [5.2](https://5.2.sourcegraph.com/)
-- [5.1](https://docs.sourcegraph.com/@5.1/)
-- [5.0](https://docs.sourcegraph.com/@5.0/)
-
-
-
-
-
-- [4.5](https://docs.sourcegraph.com/@4.5/)
-- [4.4](https://docs.sourcegraph.com/@4.4/)
-- [4.3](https://docs.sourcegraph.com/@4.3/)
-- [4.2](https://docs.sourcegraph.com/@4.2/)
-- [4.1](https://docs.sourcegraph.com/@4.1/)
-- [4.0](https://docs.sourcegraph.com/@4.0/)
-
-
-
-
-
-- [3.43](https://docs.sourcegraph.com/@3.43/)
-- [3.41](https://docs.sourcegraph.com/@3.41/)
-- [3.40](https://docs.sourcegraph.com/@3.40/)
-- [3.39](https://docs.sourcegraph.com/@3.39/)
-- [3.38](https://docs.sourcegraph.com/@3.38/)
-- [3.37](https://docs.sourcegraph.com/@3.37/)
-- [3.36](https://docs.sourcegraph.com/@3.36/)
-- [3.35](https://docs.sourcegraph.com/@3.35/)
-- [3.34](https://docs.sourcegraph.com/@3.34/)
-- [3.32](https://docs.sourcegraph.com/@3.32/)
-- [3.31](https://docs.sourcegraph.com/@3.31/)
-- [3.30](https://docs.sourcegraph.com/@3.30/)
-- [3.29](https://docs.sourcegraph.com/@3.29/)
-- [3.28](https://docs.sourcegraph.com/@3.28/)
-- [3.27](https://docs.sourcegraph.com/@3.27/)
-- [3.26](https://docs.sourcegraph.com/@3.26/)
-- [3.25](https://docs.sourcegraph.com/@3.25/)
-- [3.24](https://docs.sourcegraph.com/@3.24/)
-- [3.23](https://docs.sourcegraph.com/@3.23/)
-- [3.22](https://docs.sourcegraph.com/@3.22/)
-- [3.21](https://docs.sourcegraph.com/@3.21/)
-
-
diff --git a/src/components/VersionSelector.tsx b/src/components/VersionSelector.tsx
index 16f2eaa51..e90597242 100644
--- a/src/components/VersionSelector.tsx
+++ b/src/components/VersionSelector.tsx
@@ -2,13 +2,8 @@
import {latestVersion, VersionI, versions} from '@/data/versions';
import {Menu, Transition} from '@headlessui/react';
-import {
- ArrowUpRightIcon,
- CheckIcon,
- ChevronDownIcon
-} from '@heroicons/react/20/solid';
+import {CheckIcon, ChevronDownIcon} from '@heroicons/react/20/solid';
import clsx from 'clsx';
-import Link from 'next/link';
import {usePathname} from 'next/navigation';
import {Fragment, useEffect, useState} from 'react';
@@ -118,6 +113,9 @@ export default function VersionSelector() {
active &&
'bg-vermilion-08 text-vermilion-11',
count === 0 && 'rounded-t-md',
+ count ===
+ availableVersions.length - 1 &&
+ 'rounded-b-md',
'flex w-full items-center justify-between px-3 py-2'
)}
>
@@ -140,22 +138,6 @@ export default function VersionSelector() {
)}
))}
- {/* Legacy versions */}
-
- {({active}) => (
-
- Legacy versions
-
-
- )}
-
diff --git a/src/data/redirects.ts b/src/data/redirects.ts
index 85df907f6..8549a398d 100644
--- a/src/data/redirects.ts
+++ b/src/data/redirects.ts
@@ -4285,6 +4285,12 @@ const redirectsData = [
source: '/admin/how-to/converting-version-contexts-to-search-contexts',
destination: '/code-search/working/search-contexts'
},
+ // The legacy versions page listed docs sites for unsupported versions; the
+ // version dropdown lists every supported version's docs site
+ {
+ source: '/legacy',
+ destination: '/releases'
+ },
];
const updatedRedirectsData = redirectsData.map(redirect => {