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

Redirect Apple documentation urls? #3172

Open
finestructure opened this issue Jun 27, 2024 · 1 comment
Open

Redirect Apple documentation urls? #3172

finestructure opened this issue Jun 27, 2024 · 1 comment

Comments

@finestructure
Copy link
Member

finestructure commented Jun 27, 2024

There are doc links out there beyond the control of the repositories themselves that likely won't be updated. It would be helpful if we could redirect from */apple/{repo}/documentation/* to */swiftlang/{repo}/documentation/*.

EDIT: we could just redirect from /apple/{repo}/* to /swiftlang/{repo}/*. No need to make this documentation specific.

We'd have to do that per repository and coordinate with the move.

We're currently indexing the following Apple/Swiftlang packages that opt into documentation hosting:

https://github.com/apple/swift-algorithms.git
https://github.com/apple/swift-argument-parser.git
https://github.com/apple/swift-asn1.git
https://github.com/apple/swift-async-algorithms.git
https://github.com/apple/swift-async-dns-resolver.git
https://github.com/apple/swift-atomics.git
https://github.com/apple/swift-cassandra-client.git
https://github.com/apple/swift-certificates.git
https://github.com/apple/swift-cluster-membership.git
https://github.com/apple/swift-collections.git
https://github.com/apple/swift-distributed-actors.git
https://github.com/apple/swift-distributed-tracing-baggage-core.git
https://github.com/apple/swift-distributed-tracing.git
https://github.com/apple/swift-docc.git
https://github.com/apple/swift-docc-plugin.git
https://github.com/apple/swift-http-structured-headers.git
https://github.com/apple/swift-http-types.git
https://github.com/apple/swift-log.git
https://github.com/apple/swift-markdown.git
https://github.com/apple/swift-metrics-extras.git
https://github.com/apple/swift-metrics.git
https://github.com/apple/swift-mmio.git
https://github.com/apple/swift-nio-extras.git
https://github.com/apple/swift-nio.git
https://github.com/apple/swift-nio-http2.git
https://github.com/apple/swift-nio-ssh.git
https://github.com/apple/swift-nio-ssl.git
https://github.com/apple/swift-nio-transport-services.git
https://github.com/apple/swift-numerics.git
https://github.com/apple/swift-openapi-generator.git
https://github.com/apple/swift-openapi-runtime.git
https://github.com/apple/swift-openapi-urlsession.git
https://github.com/apple/swift-playdate-examples.git
https://github.com/apple/swift-protobuf.git
https://github.com/apple/swift-service-context.git
https://github.com/apple/swift-service-discovery.git
https://github.com/apple/swift-statsd-client.git
https://github.com/apple/swift-system.git
https://github.com/apple/swift-testing.git
https://github.com/swiftlang/indexstore-db.git
https://github.com/swiftlang/sourcekit-lsp.git
https://github.com/swiftlang/swift-format.git
https://github.com/swiftlang/swiftly.git
https://github.com/swiftlang/swift-package-collection-generator.git
https://github.com/swiftlang/swift-package-manager.git
https://github.com/swiftlang/swift-sdk-generator.git
https://github.com/swiftlang/swift-syntax.git
https://github.com/swiftlang/swift-tools-support-core.git

@finestructure
Copy link
Member Author

Unless there's an easier way to do this via Cloudflare, we'd need a bigger plan to support this:

CleanShot 2024-06-27 at 09 35 18@2x

(I cut off the bottom part of the form, the rewrite logic was regex_replace(http.request.uri.path, "^/apple/swift-syntax/", "/swiftlang/swift-syntax/").)

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

1 participant