[feature request] Custom markdown syntax for "variables" in code snippets
This is a...
- [x] Feature Request
- [ ] Bug Report
Problem:
In code snippets it can be unclear whether a value is part of the "actual code", or an example value that the reader should swap out.
For instance, dapi-test-pod in:
While the reader can figure this out by reading the instructions carefully, by and large we should assume that there's a lot of skimming going on. 😝 There are probably quite a few cases where users directly copy-and-paste lines of code without altering them.
Proposed Solution:
DigitalOcean highlights "variables" in code snippets (see https://www.digitalocean.com/community/tutorials/digitalocean-s-writing-guidelines#variables). It looks like the following:
We could likewise implement custom markdown syntax to enable something like this.
Page to Update:
Generally the whole site.
cc @chenopis (I don't think I have the ability to assign things?) Also, would definitely be interested into working on this myself!
Try /assign @chenopis in a comment.
/assign @abiogenesis-now
This is a good idea (and one common solution to the problem). BUT ... we also already have this recommendation in the style guide: https://kubernetes.io/docs/home/contribute/style-guide/#use-angle-brackets-for-placeholders. (TL;DR: another common solution) My guess is that the issue exists because there's non-conformance to the doc style guide all over the place. How much can we automate fixing the markup for what's already in place?
on hold, but I'll tag this with team/heptio anyways
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Prevent issues from auto-closing with an /lifecycle frozen comment.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or @fejta.
/lifecycle stale
Hmm...not on the immediate roadmap, but still a nice to have. I'll close this issue for now and track it in my own todos, barring any objections.