Enhance code block formatting #621
Labels
mkdocs enhancement
Changes to mkdocs features, mkdocs-material theme, custom theme overrides, etc.
style
subjective design choices, language conventions, how and when to use mkdocs & theme features
Following up from some of the changes I made to the Cerebras CSL page: #601 (comment)
Some of the above changes, and other enhancements to code blocks, should be considered and applied more broadly across our docs:
Add line numbers to more code blocks
Disable copy button for "sample output" blocks, using
```bash
----> `{ .bash .no-copy }
, etc.The "copy to clipboard" button just gets in the way for these types of blocks; I cant imagine any situation in which a reader would want to copy/paste the whole thing:

It could be useful to condense and make a more readable example script, when combined with explanations for each line, e.g.


Would move the below list to code line annotations directly in the script:
Long term: add a custom code superfence to prefix $ in the left margin, suggested here: squidfunk/mkdocs-material#3427

For long example sequences of shell commands and sample output intertwined, it would be messy to enable the copy button to only copy the command lines, excluding the "sample output", without breaking into separate blocks. For example:
The text was updated successfully, but these errors were encountered: