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

Linking to API object definitions from docs #11569

Merged
merged 1 commit into from
Jul 20, 2015

Conversation

nikhiljindal
Copy link
Contributor

@k8s-bot
Copy link

k8s-bot commented Jul 20, 2015

GCE e2e build/test passed for commit 21e113da49342beb2fab8f97b3cebf906e48e904.

@k8s-bot
Copy link

k8s-bot commented Jul 20, 2015

GCE e2e build/test passed for commit 9d25fdb96f96df44222bbfecc0a3778f3e457276.


Node is a top-level resource in the kubernetes REST API. More details about the
API object can be found at: [Node API
object](https://htmlpreview.github.io/?https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-reference/definitions.html#_v1_node).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what the best way is to link to these docs.

We're working to get them on kubernetes.io. However, the standard approach of using a relative link won't work since github won't render html. Similarly, the releases.k8s.io/HEAD redirector won't work, either.

I think we're going to need to link to the versioned docs in kubernetes.io and rewrite the links similar to how we rewrite the redirector links.

@caesarxuchao @thockin

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filed htmlpreview/htmlpreview.github.com#34 to see if that can be fixed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, https://htmlpreview.github.io/?https://github.com/GoogleCloudPlatform/kubernetes/HEAD/docs/api-reference/definitions.html#_v1_node does work. I can link to that on HEAD and update mark-new-version to replace HEAD by the new release version as it does for api/*types.go: https://github.com/GoogleCloudPlatform/kubernetes/blob/master/build/mark-new-version.sh#L112.
@bgrant0607 @thockin does that sound good?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I see

@bgrant0607 bgrant0607 added this to the v1.0 milestone Jul 20, 2015
@bgrant0607 bgrant0607 added the kind/documentation Categorizes issue or PR as related to documentation. label Jul 20, 2015
@bgrant0607
Copy link
Member

cc @krousey

@k8s-bot
Copy link

k8s-bot commented Jul 20, 2015

GCE e2e build/test passed for commit 021138b.

@nikhiljindal
Copy link
Contributor Author

cc @lavalamp

@nikhiljindal nikhiljindal assigned lavalamp and unassigned thockin Jul 20, 2015

Node is a top-level resource in the kubernetes REST API. More details about the
API object can be found at: [Node API
object](https://htmlpreview.github.io/?https://github.com/GoogleCloudPlatform/kubernetes/HEAD/docs/api-reference/definitions.html#_v1_node).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be a relative link?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind, I see.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that the files are being accessed via htmlpreview.github.io, which needs full target URLs

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link checker can't check these links :(

@lavalamp
Copy link
Member

LGTM

@lavalamp lavalamp added lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-merge labels Jul 20, 2015
krousey added a commit that referenced this pull request Jul 20, 2015
Linking to API object definitions from docs
@krousey krousey merged commit 9721efe into kubernetes:master Jul 20, 2015
mikedanese added a commit that referenced this pull request Jul 30, 2015
…#11569-upstream-release-1.0

Automated cherry pick of #11569
@brendandburns brendandburns mentioned this pull request Aug 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/documentation Categorizes issue or PR as related to documentation. lgtm "Looks good to me", indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants