#html #outline #outliner

html-outliner

Outline HTML documents for better SEO

5 releases

0.1.4 Apr 21, 2021
0.1.3 Mar 10, 2021
0.1.2 Jul 29, 2020
0.1.1 Jun 27, 2020
0.1.0 May 17, 2020

#94 in #html

MIT license

18KB
434 lines

HTML Outliner

CI

Outline HTML documents for better SEO.

Examples

extern crate html_outliner;

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
*/

Crates.io

https://crates.io/crates/html-outliner

Documentation

https://docs.rs/html-outliner

License

MIT


lib.rs:

HTML Outliner

Outline HTML documents for better SEO.

Examples

extern crate html_outliner;

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

Dependencies

~5MB
~112K SLoC