Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ pre {
border-radius: var(--code-border-radius);
margin-top: var(--code-margin-top);
margin-bottom: var(--code-margin-bottom);
background-color: var(--code-background) !important;
overflow-x: auto;
-ms-overflow-style: none;
scrollbar-width: none;
Expand Down
271 changes: 0 additions & 271 deletions assets/css/syntax-highlighting.css

This file was deleted.

4 changes: 0 additions & 4 deletions hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,3 @@ min = "0.116.0"
enabled = true
showCurrentPage = true
home = "Home"

[markup]
[markup.highlight]
noClasses = false
1 change: 0 additions & 1 deletion layouts/partials/head/css.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
(resources.Get "css/vars.css")
(resources.Get "css/utils.css")
(resources.Get "css/fonts.css")
(resources.Get "css/syntax-highlighting.css")
(resources.Get "css/main.css")
(resources.Get "css/custom.css")
}}
Expand Down
19 changes: 6 additions & 13 deletions wiki/features/appearance.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,24 +69,19 @@ I strongly recommend enabling breadcrumbs if you do so.

## Note on Syntax Highlighting

The theme supports syntax highlighting.
By default, it uses a slightly modified version of the `algol` theme, defined in `assets/css/syntax-highlighting.css`.
The code block background can be changed with the `--code-background-light` and `--code-background-dark` variables in [`custom.css`]({{% relref "advanced-customization.md#custom-css" %}}) or in a [custom color file](#adding-a-custom-color-palette).
To use a custom color scheme, you can overwrite this file.
Other color schemes, e.g. Monokai, can be applied using [inline styles]:
The theme supports syntax highlighting, and you can specify the theme as follows:

```toml
[markup]
[markup.highlight]
noClasses = true
style = 'monokai'
style = 'algol'
```

Alternatively, you can generate a stylesheet for your preferred color scheme with this command:
`algol` is the recommended theme, and for it to work, the background-color of the code
elements is enforced.
This has the side effect of breaking other color schemes, e.g. Monokai.

```shell
hugo gen chromastyles --style monokai > assets/css/syntax-highlighting.css
```
You can make them work by removing `!important` from the background color of the code pre elements.

I suggest trying [color schemes](https://xyproto.github.io/splash/docs/all.html) and see what can work for you.

Expand All @@ -100,5 +95,3 @@ Note that if you don't include the following parameters (or leave footerContent
showFooter = true
footerContent = "Your **custom** md `footer`"
```

[inline styles]: https://neohugo.github.io/content-management/syntax-highlighting/#noclasses