Skip to content

Commit 91fd8fd

Browse files
committed
Add Vue syntax highlight
1 parent c35a809 commit 91fd8fd

3 files changed

Lines changed: 10 additions & 0 deletions

File tree

app/assets/highlight.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
import CopyButtonPlugin from 'highlightjs-copy'
22
import hljs from 'highlight.js'
3+
import hljsDefineVue from 'highlightjs-vue'
34

45
// Initialize Highlight.js with Copy Button plugin
56
hljs.addPlugin(
67
new CopyButtonPlugin({
78
autohide: false // Always show the copy button
89
})
910
)
11+
hljsDefineVue(hljs) // Register Vue language definition
1012
hljs.highlightAll()

package-lock.json

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"axios": "^1.12.0",
1212
"highlight.js": "^11.11.1",
1313
"highlightjs-copy": "^1.0.6",
14+
"highlightjs-vue": "^1.0.0",
1415
"vue": "^3.3.4"
1516
},
1617
"devDependencies": {

0 commit comments

Comments
 (0)