You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
authored
Markdown freshness: fix stale path references in src README files (#62963)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copy file name to clipboardExpand all lines: src/redirects/README.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,11 +12,11 @@ Read on for more about how redirects work under the hood.
12
12
13
13
Precompiled redirects account for the majority of the docs site's redirect handling.
14
14
15
-
When [`lib/warm-server.ts`](lib/warm-server.ts) runs on server start, it creates all pages in the site by instantiating the [`Page` class](lib/page.ts) for each content file, then passes the pages to `lib/redirects/precompile.ts` to create redirects. The precompile script runs `lib/redirects/permalinks.ts`, which:
15
+
When [`src/frame/lib/warm-server.ts`](../frame/lib/warm-server.ts) runs on server start, it creates all pages in the site by instantiating the [`Page` class](../frame/lib/page.ts) for each content file, then passes the pages to `lib/precompile.ts` to create redirects. The precompile script runs `lib/permalinks.ts`, which:
16
16
17
-
1. Includes all legacy redirects from `static/developerjson`
17
+
1. Includes all legacy redirects from `lib/static/developer.json`
18
18
2. Loops over each page's [frontmatter `redirect_from` entries](content/README.md#redirect_from) and creates an array of legacy paths for each one (using the same handling as for permalinks).
19
-
3. Any other exceptions from the `static/redirect-exceptions.txt` file
19
+
3. Any other exceptions from the `lib/static/redirect-exceptions.txt` file
20
20
21
21
The results comprise the `page.redirects` object, whose keys are always only the path without language.
22
22
Sometimes it contains the specific plan/version (e.g. `/enterprise-server@3.0/v3/integrations` to `enterprise-server@3.0/developers/apps`) and sometimes it's just the plain path
@@ -44,11 +44,11 @@ Some background on archival: a snapshot of the HTML files for each deprecated En
44
44
45
45
Starting with Enterprise Server 2.18, we updated the archival process to start preserving frontmatter and permalink redirects. But these redirects for 2.13 to 2.17 are not recoverable.
46
46
47
-
As a workaround for these lost redirects, we have two files in `lib/redirects/static`:
47
+
As a workaround for these lost redirects, we have two files in `lib/static`:
48
48
49
49
*`archived-redirects-from-213-to-217.json`
50
50
51
-
This file contains keys equal to old routes and values equal to new routes (aka snapshots of permalinks at the time) for versions 2.13 to 2.17. (The old routes were generated via `lib/redirects/get-old-paths-from-permalink.ts`.)
51
+
This file contains keys equal to old routes and values equal to new routes (aka snapshots of permalinks at the time) for versions 2.13 to 2.17. (The old routes were generated via `lib/permalinks.ts`.)
52
52
53
53
*`archived-frontmatter-valid-urls.json`
54
54
@@ -66,7 +66,7 @@ Here's how the `src/archives/middleware/archived-enterprise-versions.ts` fallbac
66
66
67
67
## Tests
68
68
69
-
Redirect tests are mainly found in `tests/routing/*`, with some additional tests in `tests/rendering/server.ts`.
69
+
Redirect tests are mainly found in `tests/routing/*`, with some additional tests in `src/frame/tests/server.ts`.
70
70
71
71
The `src/fixtures/fixtures/*` directory includes `developer-redirects.json`, `graphql-redirects.json`, and `rest-redirects.json`.
0 commit comments