Skip to content

Commit

Permalink
Replace shiki with prismjs
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyasnagare committed May 14, 2022
1 parent 8300fff commit 86daf56
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 38 deletions.
2 changes: 1 addition & 1 deletion gridsome.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ module.exports = {
anchorClassName: 'icon icon-link',
plugins: [
['remark-attr'],
[ 'gridsome-plugin-remark-shiki', { theme: 'Material-Theme-Palenight', skipInline: true } ],
[ '@gridsome/remark-prismjs', { transformInlineCode: false } ],
['gridsome-plugin-remark-youtube', {width: '85%', align: 'auto'}],
]
}
Expand Down
127 changes: 91 additions & 36 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@
"dependencies": {
"@fullhuman/postcss-purgecss": "1.2.0",
"@gridsome/plugin-sitemap": "0.2.1",
"@gridsome/remark-prismjs": "^0.5.0",
"@gridsome/source-filesystem": "0.6.2",
"@gridsome/transformer-remark": "0.6.3",
"axios": "0.21.2",
"gridsome": "0.7.22",
"gridsome-plugin-remark-shiki": "0.3.0",
"gridsome-plugin-remark-youtube": "1.0.1",
"gridsome-plugin-rss": "1.1.0",
"lodash.pick": "4.4.0",
"remark-attr": "0.8.3",
"shiki": "^0.9.1",
"vue-fuse": "2.1.0",
"vue-scrollto": "2.15.0"
},
Expand Down
3 changes: 3 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
import DefaultLayout from '~/layouts/Default.vue'
import VueScrollTo from 'vue-scrollto'
import VueFuse from 'vue-fuse'
import 'prismjs/themes/prism.css'
// Prism default CSS about line numbers
import 'prismjs/plugins/line-numbers/prism-line-numbers.css'

export default function (Vue, { router, head, isClient }) {
// Set default layout as a global component
Expand Down

0 comments on commit 86daf56

Please sign in to comment.