Adding documentation, rename style file to Hugo standard name

This commit is contained in:
Henry Fredrick Schreiner 2017-11-10 13:29:44 -05:00
parent b2a458ddc2
commit b5136ec772
3 changed files with 27 additions and 3 deletions

View File

@ -18,14 +18,38 @@ This theme is designed to look great on both large-screen and small-screen (mobi
### Syntax highlighting ### Syntax highlighting
This theme has support for both server side and client side highlighting. This theme has support for either Hugo's lightning fast Chroma, or both server side and client side highlighting.
#### Chroma
To enable Chroma, add the following to your site parameters:
```
[params]
useChroma = true
```
Then, you can use a style by running:
```
hugo gen chromastyles --style=monokai > static/css/syntax.css
```
See [the Hugo docs for more](https://gohugo.io/content-management/syntax-highlighting/).
#### Server side syntax highlighting #### Server side syntax highlighting
Use the `highlight` shortcode (with Pygments), Use the `highlight` shortcode (with Pygments),
see [the Hugo documentation](http://gohugo.io/extras/highlighting/) for more information. see [the Hugo documentation](http://gohugo.io/extras/highlighting/) for more information.
To use this feature install Pygments (`pip install Pygments`) and add `pygmentsuseclasses = true` to your `config.toml`. To use this feature install Pygments (`pip install Pygments`) and add
```
pygmentsUseClasses = true
pygmentsUseClassic = true
```
to your `config.toml`.
#### Client side syntax highlighting #### Client side syntax highlighting

View File

@ -49,7 +49,7 @@
<link rel="stylesheet" href="{{ "css/pygment_highlights.css" | absURL }}" /> <link rel="stylesheet" href="{{ "css/pygment_highlights.css" | absURL }}" />
<link rel="stylesheet" href="{{ "css/highlight.min.css" | absURL }}" /> <link rel="stylesheet" href="{{ "css/highlight.min.css" | absURL }}" />
{{- else -}} {{- else -}}
<link rel="stylesheet" href="{{ "css/chroma_syntax.css" | absURL }}" /> <link rel="stylesheet" href="{{ "css/syntax.css" | absURL }}" />
{{- end -}} {{- end -}}
{{- partial "head_custom.html" . }} {{- partial "head_custom.html" . }}