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:
parent
dcd534a5bd
commit
20bc217a15
2 changed files with 15 additions and 10 deletions
7
site.ts
7
site.ts
|
@ -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({
|
||||
|
|
|
@ -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];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue