From d18fb480d396aadebda0a5278cf2c11ad479a580 Mon Sep 17 00:00:00 2001 From: Junyi Hou Date: Sun, 17 Nov 2024 19:44:18 +0800 Subject: [PATCH] fix: the readme and make the code block scrollable --- README.md | 2 +- assets/css/main.css | 4 ++++ exampleSiteMultilingual/hugo.toml | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4fa0307..fe91ef6 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ name = "Junyi" unsafe = true # true | false; Enable unsafe mode to have a better experience [markup.highlight] -style = 'base16-snazzy' # Highlight.js style +style = 'base16-snazzy' # Chroma style, find more at here: https://swapoff.org/chroma/playground/ ``` diff --git a/assets/css/main.css b/assets/css/main.css index 419a06c..4d819d2 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -249,6 +249,10 @@ div.highlight { margin-bottom: 14px; } +div.highlight div { + overflow: scroll; +} + div.highlight pre { border: none; display: grid; diff --git a/exampleSiteMultilingual/hugo.toml b/exampleSiteMultilingual/hugo.toml index 205b592..58186d6 100644 --- a/exampleSiteMultilingual/hugo.toml +++ b/exampleSiteMultilingual/hugo.toml @@ -156,13 +156,13 @@ author = "authors" defaultMarkdownHandler = 'goldmark' [markup.goldmark.renderer] -unsafe = true +unsafe = true # Enable unsafe mode to have a better experience [markup.highlight] anchorLineNos = false codeFences = true # tested with true and false. Both work. noClasses = true # If you run with markup.highlight.noClasses=false in your site configuration, you need a style sheet. -style = 'base16-snazzy' +style = 'catppuccin-frappe' # Find more style at here: https://swapoff.org/chroma/playground/ tabWidth = 4 [params.UmamiAnalytics]