Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[all] Consider replacing DEV_MODE links to lit.dev with shortened/stable redirectable links #2078

Closed
kevinpschaaf opened this issue Aug 23, 2021 · 1 comment
Assignees
Milestone

Comments

@kevinpschaaf
Copy link
Member

kevinpschaaf commented Aug 23, 2021

As we're starting to include deep links to the lit.dev docs site from DEV_MODE warnings, it seems likely that we're bound to break these links in the future if we're not careful (since user-pinned code versions can live forever while lit.dev content is bound to evolve over time).

I propose we replace deep links embedded in code with a shortened URL scheme which can be easily redirected on the lit.dev site without worrying about how URLs on the site may evolve in the future. This would also have the side-benefit of having a central place on the lit.dev site that catalogs all pages that are referred to via code.

Example:

lit.dev/msg/render-method-removed -> https://lit.dev/docs/releases/upgrade/#litelement
lit.dev/msg/multiple-versions-loaded -> https://lit.dev/docs/tools/adding-lit/#multiple-versions
...

@kevinpschaaf
Copy link
Member Author

Redirect manifest already exists here: https://github.com/lit/lit.dev/blob/main/packages/lit-dev-server/src/redirects.ts. Just need to scrub the links in code and make short-links for them.

aomarks added a commit to lit/lit.dev that referenced this issue Sep 1, 2021
Adds a https://lit.dev/msg/<code> redirect for all warnings logged by Lit's dev mode.

Half of lit/lit#2078. Other half is at lit/lit#2119.
aomarks added a commit that referenced this issue Sep 1, 2021
Adds a See https://lit.dev/msg/<code> for more information. string to all warnings logged by Lit's dev mode.

Half of #2078. Other half is at lit/lit.dev#465.
@aomarks aomarks closed this as completed Sep 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants