-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: replace website with a redirect to docs.deno.com (#1380)
Part of migration to use https://docs.deno.com/lint/ instead of bespoken https://lint.deno.land website.
- Loading branch information
1 parent
564b828
commit b4994da
Showing
25 changed files
with
32 additions
and
1,475 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,33 @@ | ||
/// <reference no-default-lib="true" /> | ||
/// <reference lib="dom" /> | ||
/// <reference lib="dom.iterable" /> | ||
/// <reference lib="dom.asynciterable" /> | ||
/// <reference lib="deno.ns" /> | ||
const rulePat = new URLPattern({ | ||
pathname: "/rules/:rule", | ||
}, { | ||
ignoreCase: true, | ||
}); | ||
|
||
import { start } from "$fresh/server.ts"; | ||
import manifest from "./fresh.gen.ts"; | ||
Deno.serve((req) => { | ||
const url = new URL(req.url); | ||
|
||
import twindPlugin from "$fresh/plugins/twind.ts"; | ||
import twindConfig from "./twind.config.ts"; | ||
const ruleMatch = rulePat.exec(req.url); | ||
const maybeRule = ruleMatch?.pathname.groups.rule; | ||
|
||
await start(manifest, { plugins: [twindPlugin(twindConfig)] }); | ||
if (maybeRule) { | ||
return Response.redirect( | ||
`https://docs.deno.com/lint/rules/${maybeRule}`, | ||
301, | ||
); | ||
} | ||
|
||
if (url.pathname.startsWith("/ignoring-rules")) { | ||
// TODO(bartlomieju): verify the anchor is not changed or use | ||
// "go" url | ||
return Response.redirect( | ||
`https://docs.deno.com/go/lint-ignore`, | ||
301, | ||
); | ||
} | ||
|
||
return Response.redirect( | ||
"https://docs.deno.com/runtime/reference/cli/lint/", | ||
301, | ||
); | ||
}); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.