-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
Heredoc snippets remove syntax coloring #45960
Comments
This issue is currently awaiting triage. SIG Docs takes a lead on issue triage for this website, but any Kubernetes member can accept issues by applying the The 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. |
/language en |
Our (existing) policy is to use downloadable manifests based on We have more work to do to get there. And, we might want to widen the scope of what you can copy; see #45910 Do you have an example of a particular snippet that you think should be done a different way to help learners @MatthewFallon ? I personally am wary of encouraging people to copy and paste snippets as-is; see #45910 (comment) |
/priority backlog |
/kind feature |
Hey @sftim 👋 yes looking at this section I see the following code snippet:
Which as commands holds no purpose other than:
There are multiple instances of this on that page, which really only serves the purpose of providing an easy copy paste as manually typing a heredoc command like such is kind of cumbersome to begin with haha. I think a fair point on not wanting to encourage too much copy pasting using buttons as such 👍 I had figured that was the original intent based on content. In this case I think you're right that these commands would better be shown as two individual Will leave this here as clarification of the suggestion, and will potentially look into contributing the change myself if I find the time. Thanks for adding context! 👍 😄 |
We don't use However, you can copy just the |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close not-planned |
@k8s-triage-robot: Closing this issue, marking it as "Not Planned". In response to this:
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-sigs/prow repository. |
Description of Issue
Current page link I am looking at for reference: https://kubernetes.io/docs/tasks/manage-kubernetes-objects/kustomization/
This is 100% a tiny gripe and not a priority demand from the documentation, but would make everything more readable for me so I will bring it up.
Heredocs
Heredocs, and a cat command using them, are a great way to make a copypasta tutorial like this extremely predictable and posix compliant. I generally have no issue with the use of them, BUT they make the entire heredoc a flat string when it comes to syntax highlighting.
When looking through the documentation above, I personally prefer to just scan the page for reference while working on a personal tool rather than actually copy paste each individual section in a sandbox just to see the output files, and having each file you are using as an example instead show as just a flat red blob of text rather than useful yaml with syntax highlighting makes it difficult to scan the page or read each document.
Suggestion
I would love if instead the behavior of the docs was to keep the files that are wanted pasted in normally, with syntax highlighting, and then provide a copy button or similar that allows the user to fill their clipboard with the associated heredoc cat command, allowing for the best of both worlds in one view.
Or
Similar to other docs which provide multiple languages with a selector along the top of each code section to keep the same language selection across the page/session providing two separate sections with the heredoc snippets as the default but allowing people to swap to the file based examples. Allowing the best of both worlds while defaulting to the sort of standard copy pasta codelab format.
Obviously know that either of these solutions may be untenable depending on the structure of the docs overall, but figured I would toss it out there, thanks for reading 👍 😄
The text was updated successfully, but these errors were encountered: