Overview
- Utilizes the versatile highlight.js JavaScript library.
- Supports 90+ coding languages.
- Choose from all 95+ available themes.
- Provides a component for adding code snippets.
- Highlight multi-line blocks of code.
- Detects
language-
andlang-
class prefixes. - Customize the highlight.js init JavaScript.
- Smart loading of CSS & JS assets.
Usage
Add pagetop-hljs
to your Cargo.toml
:
-hljs = "<Version>"
pagetop
Add pagetop_hljs::HighlightJS
to your dependencies package:
use *;
And put your code snippets on web pages:
use *;
async
📦 About PageTop
PageTop is an opinionated web framework to build modular Server-Side Rendering web solutions.
🚧 Warning
PageTop framework is currently in active development. The API is unstable and subject to frequent changes. Production use is not recommended until version 0.1.0.
📜 License
All code in this project is dual-licensed under either:
-
MIT License (LICENSE-MIT or https://opensource.org/licenses/MIT)
-
Apache License, Version 2.0, (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
at your option. This means you can select the license you prefer! This dual-licensing approach is the de-facto standard in the Rust ecosystem.