swiftlang / swift-org-website

Swift.org website
https://swift.org
Other
473 stars 184 forks source link

Preselect Linux version on /install if only one version available #709

Closed alexandersandberg closed 3 months ago

alexandersandberg commented 3 months ago

Motivation:

Suggestion from #676 by @daveverwer.

Modifications:

Note: The best implementation of this would be to store the platforms/versions in a data file and dynamically (at build-time) decide whether we should directly link to the version or not based on the data.

I did start working on this but decided to go for this simpler, manual implementation for now as I think in general the install page data can be reworked to not only store the platforms/versions in a data file but also generate the pages based on this data.

@shahmishal @federicobucchi let me know what you think about this—whether this quick implementation is still worth it or if we should consider the data file solution right away.

Result:

On /install, clicking a Linux platform with only one version will directly link to that version instead of requiring an extra click.

alexandersandberg commented 3 months ago

@swift-ci please test