Skip to main content

build_search_entry

Function build_search_entry 

Source
pub fn build_search_entry(title: &str, url: &str, html: &str) -> SearchEntry
Expand description

Build a search index entry from HTML content and metadata.

ยงExamples

let entry = ssg_core::build_search_entry(
    "Welcome",
    "/index.html",
    "<p>Hello <b>world</b></p>",
);
assert_eq!(entry.title, "Welcome");
assert_eq!(entry.url, "/index.html");
assert_eq!(entry.content, "Hello world");