include_md 0.2.1

Include markdown file or its section.
Documentation

Module :: include_md

experimental rust-status docs.rs discord

Include markdown file or its section.

To add to your project

cargo add include_md

Quick Start

Include a complete markdown file as a compile-time string constant:

let content = include_md::include_md!( "../readme.md" );
println!( "{content}" );

Include only a named section from a markdown file:

let section = include_md::include_md_section!( "readme.md", "## Quick Start" );
println!( "{section}" );

Paths for include_md! resolve relative to the source file (same as include_str!). Paths for include_md_section! resolve relative to CARGO_MANIFEST_DIR (crate root). Both macros reject files larger than 10 MB at compile time.