docs/site: add Rouge syntax highlighting styles

This commit is contained in:
Gabriel Arazas 2023-07-09 12:14:29 +08:00
parent 1975ee0554
commit 4e72a3fe25
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC
2 changed files with 8 additions and 1 deletions

View File

@ -1,7 +1,8 @@
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode | default "en" }}">
<head>
{{- partial "head.html" . -}}
{{ partial "head.html" . -}}
{{ partial "head-extended.html" . }}
</head>
<body>
<nav class="book sidebar" aria-label="Table of contents">

View File

@ -0,0 +1,6 @@
{{- /* Here's where the customized version should be. */ -}}
{{ $highlighter := resources.Get "css/rouge.scss" | resources.ToCSS }}
{{- if hugo.IsProduction }}
{{ $highlighter = $highlighter | resources.Minify | resources.Fingerprint }}
{{ end }}
<link rel="stylesheet" href="{{ $highlighter.RelPermalink }}"/>