feat: configure Shiki syntax highlighting with warm workbench theme
This commit is contained in:
+69
-1
@@ -1,10 +1,78 @@
|
||||
import { defineConfig } from 'astro/config';
|
||||
import mdx from '@astrojs/mdx';
|
||||
|
||||
const workbenchTheme = {
|
||||
name: 'workbench',
|
||||
type: 'light',
|
||||
colors: {
|
||||
'editor.background': '#EEEAE2',
|
||||
'editor.foreground': '#3D342E',
|
||||
},
|
||||
tokenColors: [
|
||||
{
|
||||
scope: ['comment', 'comment.line', 'comment.block'],
|
||||
settings: { foreground: '#948880', fontStyle: 'italic' },
|
||||
},
|
||||
{
|
||||
scope: ['keyword', 'storage', 'keyword.control'],
|
||||
settings: { foreground: '#A0522D' },
|
||||
},
|
||||
{
|
||||
scope: ['string', 'string.template'],
|
||||
settings: { foreground: '#7D6C2F' },
|
||||
},
|
||||
{
|
||||
scope: ['constant', 'constant.numeric', 'constant.language'],
|
||||
settings: { foreground: '#7D6C2F' },
|
||||
},
|
||||
{
|
||||
scope: ['entity.name.function', 'support.function'],
|
||||
settings: { foreground: '#2B2421', fontStyle: 'bold' },
|
||||
},
|
||||
{
|
||||
scope: ['entity.name.type', 'entity.name.class', 'support.type'],
|
||||
settings: { foreground: '#B07051' },
|
||||
},
|
||||
{
|
||||
scope: ['variable', 'variable.other'],
|
||||
settings: { foreground: '#3D342E' },
|
||||
},
|
||||
{
|
||||
scope: ['punctuation', 'punctuation.definition', 'punctuation.separator'],
|
||||
settings: { foreground: '#6B5F55' },
|
||||
},
|
||||
{
|
||||
scope: ['entity.name.tag'],
|
||||
settings: { foreground: '#A0522D' },
|
||||
},
|
||||
{
|
||||
scope: ['entity.other.attribute-name'],
|
||||
settings: { foreground: '#7D6C2F' },
|
||||
},
|
||||
{
|
||||
scope: ['support.type.property-name', 'meta.object-literal.key'],
|
||||
settings: { foreground: '#2B2421' },
|
||||
},
|
||||
{
|
||||
scope: ['keyword.operator', 'keyword.operator.assignment'],
|
||||
settings: { foreground: '#6B5F55' },
|
||||
},
|
||||
{
|
||||
scope: ['keyword.control.import', 'keyword.control.export'],
|
||||
settings: { foreground: '#A0522D' },
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export default defineConfig({
|
||||
site: 'https://kenotron.github.io',
|
||||
base: '/crashtestdev',
|
||||
integrations: [
|
||||
mdx(),
|
||||
],
|
||||
});
|
||||
markdown: {
|
||||
shikiConfig: {
|
||||
theme: workbenchTheme,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user