Skip to content

Commit 83aeeaf

Browse files
authored
new ec.config.mjs per expressivecode docs (#19)
Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
1 parent ecefa65 commit 83aeeaf

2 files changed

Lines changed: 20 additions & 14 deletions

File tree

astro.config.mjs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { defineConfig } from 'astro/config';
33
import starlight from '@astrojs/starlight';
44
import catppuccin from '@catppuccin/starlight';
55
import starlightBlog from 'starlight-blog';
6-
import { pluginLineNumbers } from '@expressive-code/plugin-line-numbers';
76
import starlightFullViewMode from 'starlight-fullview-mode'
87

98
// https://astro.build/config
@@ -42,19 +41,6 @@ export default defineConfig({
4241
href: 'https://github.com/EdwardAngert',
4342
},
4443
],
45-
expressiveCode: {
46-
plugins: [pluginLineNumbers()],
47-
defaultProps: {
48-
// Disable line numbers by default
49-
showLineNumbers: false,
50-
// But enable line numbers for certain languages
51-
overridesByLang: {
52-
'text,toml,yaml': {
53-
showLineNumbers: true,
54-
},
55-
},
56-
},
57-
},
5844
plugins: [
5945
catppuccin({
6046
dark: { flavor: "mocha", accent: "mauve" },

ec.config.mjs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { pluginLineNumbers } from '@expressive-code/plugin-line-numbers';
2+
3+
/** @type {import('astro-expressive-code').AstroExpressiveCodeOptions} */
4+
export default {
5+
plugins: [pluginLineNumbers()],
6+
defaultProps: {
7+
// Disable line numbers by default
8+
showLineNumbers: false,
9+
overridesByLang: {
10+
// Enable line numbers for certain languages
11+
'text,toml,yaml': {
12+
showLineNumbers: true,
13+
},
14+
// Wrap long lines for shell and text
15+
'shell,url': {
16+
wrap: true,
17+
},
18+
},
19+
},
20+
};

0 commit comments

Comments
 (0)