Open s3tupw1zard opened 4 months ago
Hi
if (docSelectorAll('code[class*=language-]').length && typeof prismJs !== 'undefined') {
const $code = docSelectorAll('code[class*=language-]')
$code.forEach(element => {
element.classList.add('line-numbers')
})
loadScript(prismJs)
}
import Prism from 'prismjs'
import 'prismjs/plugins/autoloader/prism-autoloader'
// here Plugins
import 'prismjs/plugins/line-numbers/prism-line-numbers'
// Other Plugins
// import 'prismjs/plugins/toolbar/prism-toolbar'
// import 'prismjs/plugins/copy-to-clipboard/prism-copy-to-clipboard'
// import 'prismjs/plugins/show-language/prism-show-language'
yarn run prod
read doc
https://github.com/godofredoninja/simply/blob/master/CONTRIBUTING.md
Okay, I edited my fork of your repo as you described, but the line-numbers are still not showing up.
You also have to add your line-numbers classes
Hi, I added Prism.js to my Ghost Blog with simply installed but the Line-Numbers Plugin isn't working for code blocks.
This is how I'm trying to add line-numbers:
This is what I added to my site footer:
This are the libraries and plugins I added from prism.js:
Site Header:
Site Footer:
I added all libraries and plugins I'm using here for completeness.
This is what it looks like when I go to the preview of my blog post:
There should be line numbers at the beginning of every line. This is working on other themes, like the default one.
Thanks