
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@breautek/hexo-prism-plugin
Advanced tools
Since highlight.js
didn't support JSX syntax properly, I wrote this plugin to replace
Hexo's default code highlight plugin.
npm i -S hexo-prism-plugin
Firstly, you should edit your _config.yml
by adding following configuration.
prism_plugin:
mode: 'preprocess' # realtime/preprocess
theme: 'default'
line_number: false # default false
custom_css: 'path/to/your/custom.css' # optional
After that, check highlight
option in _config.yml
. Make sure that default code highlight plugin is disabled.
highlight:
enable: false
Finally, clean and re-generate your project by running following commands:
hexo clean
hexo generate
mode:
theme:
line_number:
no_assets
You can check out prism-themes project for additional theme preview:
https://github.com/PrismJS/prism-themes#available-themes
You could find the supported languages here:
http://prismjs.com/#languages-list
MIT
FAQs
Hexo code highlight by Prism.js
We found that @breautek/hexo-prism-plugin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.