denoland / dotland

[Archived] deno.land website
https://deno.land
MIT License
957 stars 626 forks source link

feat: add manual redirects #2558

Closed crowlKats closed 1 year ago

crowlKats commented 2 years ago

@ry we currently have no tests whatsoever for the manual. if we really do want a test for this, ideally then we would land this & the rewrite first so we have a redirect, and then add a test based on a provided redirect in a follow-up. would that be fine?

ry commented 1 year ago

@crowlKats

we currently have no tests whatsoever for the manual.

Yes we do: https://github.com/denoland/dotland/blob/main/util/manual_utils_test.ts. I've added a test stub for you, please add some tests.

kt3k commented 1 year ago

I believe we need to create mapping from old pages to new pages and set them in toc.json in #400

Is this understanding correct?

for example npm_specifiers node becomes:

{
  "npm_specifiers": "Using Node.js Packages with npm Specifiers",
  ...
}

to:

{
  "npm_specifiers": {
    "name": "Using Node.js Packages with npm Specifiers",
    "redirectFrom": ["/node/compatibility_mode"]
  },
  ...
}