dvc.org icon indicating copy to clipboard operation
dvc.org copied to clipboard

doc: replace `dvc` code block lang. for `cli`

Open jorgeorpinel opened this issue 4 years ago • 10 comments

We use ```dvc for all kinds of console session examples throughout blocks, not just DVC commands (sometimes there's no DVC command in the block). Maybe we should change to ```cli? or ```console (standard)

This applies to Markdown file processing.

UPDATE: See https://github.com/iterative/dvc.org/issues/1369#issuecomment-1144532818 below.

jorgeorpinel avatar May 28 '20 00:05 jorgeorpinel

My 2cs. It's too specific too dvc I would say - it's literally bash + dvc syntax. cli or console are too generic? and can overlap with existing highlighters?

shcheklein avatar May 28 '20 00:05 shcheklein

Yes maybe you're right.

can overlap with existing highlighters?

There are other built-in highlighters? I thought we only had dvc, usage, py, json, and yaml

jorgeorpinel avatar May 28 '20 18:05 jorgeorpinel

yep, there are some taken already https://prismjs.com/#supported-languages

shcheklein avatar May 28 '20 18:05 shcheklein

Nice. So neither cli nor console are taken (the latter I know Github has but it's custom to them). Only bash and shell are taken.

jorgeorpinel avatar May 29 '20 07:05 jorgeorpinel

It's too specific too dvc I would say - it's literally bash + dvc syntax

Yes but what if in the future we want to support special highlighting in the YAML file since there are some DVC schema specific fields in .dvc files and dvc.yaml? We would just extend the yaml highlight right? Same for bash in that case, we should just use the existing one and extend it. Except we have users in all sorts of shells, not just Bash, thus I vote for console (copying GH) or just cli which can be based of bash.

But anyway this is a minor detail over all. No strong opinion or any urgency

jorgeorpinel avatar May 29 '20 07:05 jorgeorpinel

Good point, @jorgeorpinel ! I think console is good then. I wonder how will GH highlight it.

shcheklein avatar May 29 '20 19:05 shcheklein

We use ```dvc for all kinds of console session examples throughout blocks, not just DVC commands (sometimes there's no DVC command in the block). Maybe we should change to ```cli? or ```console (standard)

This applies to Markdown file processing.

Yep, in workflows it's quite easy to understand the standard console to describe a console session.

MerlynMShelley avatar May 29 '20 19:05 MerlynMShelley

@jorgeorpinel is this a generic substitution of all ```dvc to ```console? Wanted to confirm as there's some discussion on this. If so, I can apply a regex script to do so.

MayankGoel28 avatar Jun 08 '20 11:06 MayankGoel28

Hi @MayankGoel28 and sorry for the delay (we're really busy recently releasing DVC 1.0). No, this would require customization of the JS engine code first, and then also changing the md content, yes.

jorgeorpinel avatar Jun 11 '20 17:06 jorgeorpinel

This will be resolved by #3396 but we can keep this open to update the contents (mass-replace ```dvc for ```cli.

jorgeorpinel avatar Jun 02 '22 07:06 jorgeorpinel