1
Fork 0
mirror of https://github.com/RGBCube/Site synced 2025-07-30 12:37:50 +00:00

highlight: set class prefix to token- and ignore no-highlight to suppress errors

This commit is contained in:
RGBCube 2025-06-08 18:08:43 +03:00
parent dcd534a5bd
commit 20bc217a15
Signed by: RGBCube
SSH key fingerprint: SHA256:CzqbPcfwt+GxFYNnFVCqoN5Itn4YFrshg1TrnACpA5M
2 changed files with 15 additions and 10 deletions

View file

@ -170,7 +170,12 @@ site.use(extractDate());
site.use(redirects());
site.use(tailwindcss());
site.use(codeHighlight());
site.use(codeHighlight({
options: {
classPrefix: "token-",
noHighlightRe: /^no-highlight$/,
},
}));
site.use(resolveUrls());
site.use(slugifyUrls({

View file

@ -280,31 +280,31 @@ body {
dark:bg-[#111] dark:shadow-[4px_4px_#bbb];
}
.hljs-attr {
.token-attr {
@apply text-[darkblue] dark:text-[lightblue];
}
.hljs-built_in {
.token-built_in {
@apply text-[darkred] dark:text-[firebrick];
}
.hljs-comment {
.token-comment {
@apply italic text-[dimgray] dark:text-[darkgray];
}
.hljs-keyword {
.token-keyword {
@apply text-[darkred] dark:text-[firebrick];
}
.hljs-number {
.token-number {
@apply text-[darkslateblue] dark:text-[mediumslateblue];
}
.hljs-string {
.token-string {
@apply text-[darkgreen] dark:text-[limegreen];
}
.hljs-symbol {
.token-symbol {
@apply text-[darkgoldenrod] dark:text-[gold];
}
.hljs-title {
.token-title {
@apply text-[indianred] dark:text-[lightcoral];
}
.hljs-type {
.token-type {
@apply text-[darkcyan] dark:text-[aquamarine];
}
}