Replies: 3 comments 1 reply
-
+1 for this |
Beta Was this translation helpful? Give feedback.
-
+1 for this. I want to load my vscode-theme for my project. I tried "preload" and "themes" configuration, loaded the theme json, but it didn't work.I don't know how to configure it correctly. |
Beta Was this translation helpful? Give feedback.
-
Even though it's not documented in Nuxt Content and your editor may complain so you'll have to assets/css/themes/shiki/mocha.ts import type { ThemeRegistration } from '@shikijs/types';
export const mocha: ThemeRegistration = Object.freeze({
name: 'mocha',
displayName: 'Catppuccin Mocha',
semanticHighlighting: true,
type: 'dark',
colors: {
/**
* Color Config
*/
},
}); nuxt.config.ts // noinspection JSUnusedGlobalSymbols
import { mocha } from './assets/css/themes/shiki/mocha.ts'
export default defineNuxtConfig({
content: {
highlight: {
theme: { // @ts-expect-error: It works
dark: mocha, // @ts-expect-error: It works
default: mocha, // @ts-expect-error: It works
light: mocha, // @ts-expect-error: It works
}, // @ts-expect-error: It works
langs: [
'ruby', 'python',
'javascript', 'csharp', 'sql',
'liquid', 'shell',
'scss', 'ts',
],
},
},
}); |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I was reading through the shiki docs on github and I found myself needing some custom highlighting. Is there a way to include some custom rules through the nuxt config under the highlight option?
Beta Was this translation helpful? Give feedback.
All reactions