mirror of https://github.com/lxndrblz/anatole.git

Alexander Bilz
24.52.2020 e298aaecb8f4bd0c08f9adf992e6e95138be5c1d
Fix syntax highlighting
2 files modified
12 ■■■■ changed files
README.md 5 ●●●●● patch | view | raw | blame | history
layouts/partials/head.html 7 ●●●● patch | view | raw | blame | history
README.md
@@ -268,6 +268,11 @@
hugo gen chromastyles --style=monokailight > assets/css/syntax.css
```
If you get any errors, make sure the `assets/css/` directory exists within your sites root folder.
Include the newly generated `syntax.css` like a standard custom css script:
```
[params]
customCss = ["css/syntax.css"]
```
## License
layouts/partials/head.html
@@ -8,15 +8,10 @@
    <link rel="stylesheet" href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity }}" crossorigin="anonymous" type="text/css">
    {{- $css := "" -}}
    {{- range .Site.Params.customCss -}}
    {{ $css := resources.Get . | minify | fingerprint }}
    {{ $css := resources.Get . | fingerprint }}
    <link rel="stylesheet" href="{{ $css.Permalink }}" integrity="{{ $css.Data.Integrity }}" crossorigin="anonymous" type="text/css">
    {{- end -}}
    <link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
    <!-- Code highlighting -->
    {{- if .Site.Params.pygmentsUseClasses }}
    {{ $style := resources.Get "css/syntax.css" | resources.Fingerprint }}
    <link rel="stylesheet" href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity }}" crossorigin="anonymous" type="text/css">
    {{- end -}}
    <!-- Favicons -->
    <link rel="shortcut icon" href="{{ .Site.Params.favicon | absURL }}favicon.ico" type="image/x-icon">
    <link rel="apple-touch-icon" sizes="180x180" href="{{ .Site.Params.favicon | absURL }}apple-touch-icon.png">