-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
How to generate highlightjs's style of codeblock #2145
Comments
gutter can be removed by setting: highlight:
enable: true
line_number: false
auto_detect: false
tab_replace: |
@stackOverMind Setting |
@xcatliu The code for So, you could take that and customise it to suit your needs. I think that's something we may do as we want to make the code highlighting functionality more of our own. Maybe build your own tag that uses the functionality. |
I had this problem too. It seems like hexo was configured to use the old non- I think this block is the problem - seems odd to kill highlight's default, good-for-css-architecture behaviour in hexo to fix a CSS problem in some hexo themes. Happy to PR up a change reversing this if anyone involved thinks it's a good idea? |
@bensmithett Agree. The |
+1 to somehow making it easy to customize In my case, I want something like:
The |
I see the latest version of the code has references to |
@matthidinger Hey, sorry for the late reply, I've been busy with other stuff. Unless the highlighting code has changed since, the PR I made (hexojs/hexo-util#30) should still work, that is, you can add I'm not an active contributor so I haven't been keeping up with latest development, but if it doesn't work for you, let me know and I'll look into it. Cheers, |
|
# _config.yml
highlight:
enable: true
hljs: true
wrap: true The config should be all right then. Works on Hexo 4.0.0 or later. |
Using the default config will generate code block like this:
Is there a way to generate code block like the official highlightjs's stlye?
The text was updated successfully, but these errors were encountered: