Crates.io | html-outliner |
lib.rs | html-outliner |
version | 0.1.6 |
source | src |
created_at | 2020-05-17 16:34:01.700083 |
updated_at | 2023-09-11 05:45:07.694701 |
description | Outline HTML documents for better SEO. |
homepage | https://magiclen.org/rust-html-outliner |
repository | https://github.com/magiclen/html-outliner |
max_upload_size | |
id | 242712 |
size | 18,477 |
Outline HTML documents for better SEO.
use html_outliner::Outline;
const MAX_DEPTH: usize = 50;
let outline = Outline::parse_html(r"
<h1>Header Top</h1>
<h1>Header 1</h1>
<h2>Header 2</h2>
<h3>Header 3</h3>
<h4>Header 4</h4>
<h5>Header 5</h5>
<h6>Header 6</h6>
", MAX_DEPTH);
println!("{}", outline);
/*
1. Header Top
2. Header 1
1. Header 2
1. Header 3
1. Header 4
1. Header 5
1. Header 6
*/
https://crates.io/crates/html-outliner