Skip to content

Conversation

@robscott
Copy link
Member

What type of PR is this?
/kind cleanup

What this PR does / why we need it:
Previously reference docs were converted from godoc to HTML with gen-crd-api-reference-docs and then converted to markdown with mkdocs as part of generating the docs site. This takes out the second step and instead inserts the generated html for the reference docs directly into the generated html for the docs site.

I will be the first to say this is a rather ugly solution and I'm very open to others. I've tried lots of different approaches but it's quite difficult to solve this without removing the double conversion that was happening before. I tried using the include directive we use elsewhere with mkdocs but even that results in the html getting converted to markdown again. #539 has some other options I tried as well with limited success.

Some notable downsides of this approach:

  • We need to use backticks to escape * characters in godoc.
  • Generated reference docs are not included in make serve.
  • docs-src/spec.md does not include generated reference docs - need to either look at docs-src/spec.html or the website itself.

I'm very open to other solutions here, but so far this is the least bad solution I've found.

Which issue(s) this PR fixes:
Fixes #539

Does this PR introduce a user-facing change?:

NONE

/cc @jpeach @hbagdi @jberger

@k8s-ci-robot k8s-ci-robot added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Feb 12, 2021
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 12, 2021
@k8s-ci-robot
Copy link
Contributor

@robscott: GitHub didn't allow me to request PR reviews from the following users: jberger.

Note that only kubernetes-sigs members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

What type of PR is this?
/kind cleanup

What this PR does / why we need it:
Previously reference docs were converted from godoc to HTML with gen-crd-api-reference-docs and then converted to markdown with mkdocs as part of generating the docs site. This takes out the second step and instead inserts the generated html for the reference docs directly into the generated html for the docs site.

I will be the first to say this is a rather ugly solution and I'm very open to others. I've tried lots of different approaches but it's quite difficult to solve this without removing the double conversion that was happening before. I tried using the include directive we use elsewhere with mkdocs but even that results in the html getting converted to markdown again. #539 has some other options I tried as well with limited success.

Some notable downsides of this approach:

  • We need to use backticks to escape * characters in godoc.
  • Generated reference docs are not included in make serve.
  • docs-src/spec.md does not include generated reference docs - need to either look at docs-src/spec.html or the website itself.

I'm very open to other solutions here, but so far this is the least bad solution I've found.

Which issue(s) this PR fixes:
Fixes #539

Does this PR introduce a user-facing change?:

NONE

/cc @jpeach @hbagdi @jberger

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: robscott

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Feb 12, 2021
@robscott
Copy link
Member Author

Need to get tests running again now that repo has been renamed, will make a PR to test-infra shortly.
/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 12, 2021
@robscott
Copy link
Member Author

Waiting for kubernetes/test-infra#20851 to merge in before cancelling hold on this.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 12, 2021
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 12, 2021
@robscott
Copy link
Member Author

/retest

@bowei
Copy link
Contributor

bowei commented Feb 12, 2021

seems ok to me

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 12, 2021
Previously reference docs were converted from godoc to HTML with
gen-crd-api-reference-docs and then converted to markdown with mkdocs as
part of generating the docs site. This takes out the second step and
instead inserts the generated html for the reference docs directly into
the generated html for the docs site.
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 12, 2021
@robscott
Copy link
Member Author

@bowei Updated to use better replacement string. PTAL.

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 12, 2021
@youngnick
Copy link
Contributor

I agree it's not the most elegant solution, but it's much, much better than what we had before.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 15, 2021
@k8s-ci-robot k8s-ci-robot merged commit 9bc7010 into kubernetes-sigs:master Feb 15, 2021
@robscott robscott deleted the docs-special-chars branch January 8, 2022 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rendering of literal star characters in documentation

4 participants