Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

Fix syntax highlighting issues with Chroma #145

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ hugo -t cocoa-eh

If you want a simple blog you can just use the `exampleSite`. The [wiki](https://github.com/mtn/cocoa-eh-hugo-theme/wiki) includes helpful details should you need more.

## Contributing

See the [contributing guidelines](CONTRIBUTING.md).

## License

Licensed under the MIT License. See the [LICENSE](https://github.com/mtn/cocoa-eh-hugo-theme/blob/master/LICENSE) file for more details.
3 changes: 3 additions & 0 deletions layouts/partials/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,9 @@ div.main .content .markdown h6 {
margin-bottom: 1rem;
letter-spacing: none;
}
pre {
overflow-x: auto;
}
div.main .content .markdown code,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Required for displaying the horizontal scrollbars in code snippets that exceed the maximum width. The change is necessary only for the Chroma case, but it does not break anything in the highlighting.js case.

div.main .content .markdown pre {
font-family: 'Menlo', monospace;
Expand Down
2 changes: 2 additions & 0 deletions layouts/partials/head_includes.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
<style type="text/css" media="screen">
{{ partial "css/highlight.min.css" . | safeCSS }}
</style>
{{ else }}
<link type="text/css" rel="stylesheet" href="{{ .Site.BaseURL }}css/syntax.css">
{{ end }}

{{ if .Site.Params.progressively }}
Expand Down