Skip to content

add support for default-target #224

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

Closed

Conversation

QuietMisdreavus
Copy link
Member

@QuietMisdreavus QuietMisdreavus commented Jul 22, 2018

This changes gives an effect to the default-target option. A crate that adds a default-target to their docs.rs metadata in Cargo.toml will cause docs.rs/my_crate/$VERSION (and docs.rs/my_crate) to redirect to docs.rs/my_crate/$VERSION/$DEFAULT_TARGET/my_crate (assuming a build target of my_crate).

Caveat: the redirect doesn't check that the target has docs available. I'm not sure why but my local clone doesn't properly build and save docs for all targets, so accessing localhost:3000/winapi redirects properly to localhost:3000/winapi/0.3.5/x86_64-pc-windows-msvc/winapi/, but immediately hits a 404. This would work in docs.rs's production environment, but i want to look into adding a check, regardless. whoops that was easier than i thought, all good now. I mean, the bug where it doesn't seem to get the docs for all the targets in a local clone still exists, but at least we don't get bogus redirects now.

@QuietMisdreavus QuietMisdreavus changed the title [wip] add support for default-target add support for default-target Jul 22, 2018
@QuietMisdreavus
Copy link
Member Author

Closing in favor of #255, which has already merged

@QuietMisdreavus QuietMisdreavus deleted the default-target branch November 2, 2018 13:08
@onur onur mentioned this pull request Feb 27, 2019
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

Successfully merging this pull request may close these issues.

1 participant