| 1 |
hugo gen chromastyles -h |
| 2 |
stdout 'Generate CSS stylesheet for the Chroma code highlighter' |
| 3 |
hugo gen chromastyles --style monokai |
| 4 |
stdout 'Generated using: hugo gen chromastyles --style monokai' |
| 5 |
! hugo gen chromastyles --style __invalid_style__ |
| 6 |
stderr 'invalid style: __invalid_style__' |
| 7 |
|
| 8 |
# Not empty classes. |
| 9 |
# From Hugo 0.149.0 empty classes are always removed, so no need for the omitEmpty flag. |
| 10 |
hugo gen chromastyles --style monokai |
| 11 |
! stdout '{ }' |
| 12 |
hugo gen chromastyles --omitEmpty --style monokai --logLevel info |
| 13 |
stderr 'deprecated: --omitEmpty was deprecated' |
| 14 |
|
| 15 |
# Keep same-colour token classes in generated CSS. This is needed when pairing |
| 16 |
# styles such as github and github-dark in dual-theme sites. |
| 17 |
hugo gen chromastyles --style github-dark |
| 18 |
stdout 'NameOther.*\.chroma \.nx \{ color:#e6edf3 \}' |
| 19 |
|
| 20 |
# Disable class comments. |
| 21 |
hugo gen chromastyles --style monokai |
| 22 |
stdout 'GenericSubheading' |
| 23 |
hugo gen chromastyles --omitClassComments --style monokai |
| 24 |
! stdout 'GenericSubheading' |
| 25 |
|