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

Generate unique type headers #30

Open
justenstall opened this issue Jul 12, 2022 · 1 comment
Open

Generate unique type headers #30

justenstall opened this issue Jul 12, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@justenstall
Copy link
Contributor

The current headers in the markdown template are not guaranteed to be unique since they do not include the version. For my use case I have multiple versions of a CRD with the same types in each version. Since the output is all in one file, when I want to link to a type from another markdown file (like out.md#typename), it will only ever link to the first heading matching the link, which could be an out of date reference. I tried creating my own template for this but the issue is the markdown RenderTypeLink function will no longer create accurate links with the change.

@justenstall
Copy link
Contributor Author

Workaround for this is to generate each version to its own file, so markdown links are versioned even though the headers do not reference the version.

crd-ref-docs --source-path=path/to/v1alpha1 --config=apidocs.yaml --renderer=markdown --output-path=docs/apis/v1alpha1.md
crd-ref-docs --source-path=path/to/v1alpha2 --config=apidocs.yaml --renderer=markdown --output-path=docs/apis/v1alpha2.md
crd-ref-docs --source-path=path/to/v1alpha3 --config=apidocs.yaml --renderer=markdown --output-path=docs/apis/v1alpha3.md

@thbkrkr thbkrkr added the enhancement New feature or request label Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants