dart-lang / site-www

Source for Dart website
https://dart.dev
Other
968 stars 696 forks source link

Consider adding a redirect system for language feature specifications similar to Flutter design docs #5079

Open parlough opened 1 year ago

parlough commented 1 year ago

Currently it's a bit awkward to link to feature specifications on the language repository. When they are being worked on, then accepted, then released, their link changes every time. Beyond that, the links are long and definitely not memorable.

Developers often love to see what's coming, learn from the specifications, track them, share them, etc. We also use these links occasionally on dart.dev.

We should consider tracking redirects that we handle updating, so we can have a persistent link to link to from anywhere, sort of similar to Flutter design docs that live at flutter.dev/go/.

This could be done on this repository, but it would probably be better on the language repository's spec.dart.dev Firebase instance, which would allow atomic updates of the redirects as the documents move. Then we could add a single redirect from dart.dev to spec.dart.dev for those design docs.

If we managed this in dart-lang/language, the workflow would look like:

  1. When adding a design doc:
    1. Add the redirect to dart-lang/language's firebase.json under a name /feature-spec/class-modifiers or something similar.
    2. Add the dart.dev redirect link to the document at the top of the feature specification itself for easy sharing.
  2. When moving it to a different directory, replace the destination URL.

\cc @MaryaBelanger

mit-mit commented 6 months ago

Should we just go with dart.dev/go/ ? We still have time to change https://github.com/dart-lang/site-www/pull/5684 to /go/macros...