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

Remove $ from commands #823

Closed
moficodes opened this issue Mar 31, 2024 · 6 comments
Closed

Remove $ from commands #823

moficodes opened this issue Mar 31, 2024 · 6 comments
Assignees
Labels
copyedit design/style Front-end site design / styling ux

Comments

@moficodes
Copy link
Contributor

In a number of doc pages we have $ in the command.

If we were to copy the command to run ourselves the $ will also get copied. We should remove these.

e.g. https://etcd.io/docs/v3.5/quickstart/

@moficodes
Copy link
Contributor Author

/assign

@ivanvc
Copy link
Member

ivanvc commented Apr 25, 2024

Hey @moficodes, as discussed during the triage meeting, there is a Markdown lint rule regarding this. Please refer to: https://github.com/markdownlint/markdownlint/blob/main/docs/RULES.md#md014---dollar-signs-used-before-commands-without-showing-output

Regarding linting, refer to: #774 (comment)

@moficodes
Copy link
Contributor Author

While I understand the Markdown linting rule. My concern were more with the usability of the commands. We have a copy button but its pretty useless with the $ and output in the same block.

I think we should remove all $ signs from command that people might want to copy and paste and also separate outputs from the same code block. Its one time tedious work. but once done it will make the whole project more user friendly.

@ivanvc
Copy link
Member

ivanvc commented Apr 25, 2024

I agree, but if the code block also contains sample output, what's the value of copying it? I think we need someone else (thinking of @jmhbnz after he returns from his leave) to weigh in.

@jmhbnz
Copy link
Member

jmhbnz commented May 5, 2024

We should follow markdownlint conventions where possible unless we have a very good reason not to.

The page we are talking about is https://etcd.io/docs/v3.5/quickstart.

On that page I can see we have source code blocks that include both the command run, as well as the output of that command within a single block. The guidance for this is as linked by @ivanvc and essentially says the way we do it currently is correct as we need to distinguish between the command, and the output produced by the command.

If we want to use the copy/paste functionality for the command, then we would need to split the output of the commands into separate code blocks, otherwise the $ signs need to stay.

I don't have a strong opinion which approach we take (sticking with current state, vs adding separate results blocks), so longs we are adhering to best practices outlined in markdownlint and being consistent across the site.

@jmhbnz jmhbnz added design/style Front-end site design / styling ux copyedit labels May 5, 2024
@jmhbnz
Copy link
Member

jmhbnz commented May 12, 2024

Closing - We are following markdownlint best practice currently and I don't think rewriting pages to separate command from results is a priority for website. We have many pages that need much more meaningful updates currently. Happy to re-open if community has strong opposition or something changes around best practices from lint.

@jmhbnz jmhbnz closed this as completed May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
copyedit design/style Front-end site design / styling ux
Projects
None yet
Development

No branches or pull requests

3 participants