-
-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prism.js Line-Numbers Plugin not working #182
Comments
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)
} Lines 73 to 75 in b8f23f1
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' Lines 6 to 7 in b8f23f1
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
The text was updated successfully, but these errors were encountered: