Expand description
Search Engine Optimization (SEO) functionality for HTML processing.
This module provides tools for improving the SEO of web pages through automated meta tag generation and structured data implementation. It includes features for:
- Meta tag generation for improved search engine visibility
- Structured data (JSON-LD) generation for rich search results
- HTML content analysis for SEO optimization
- Safe HTML entity escaping
§Examples
use html_generator::seo::{MetaTagsBuilder, generate_structured_data};
let html = r#"<html><head><title>My Page</title></head><body><p>Content</p></body></html>"#;
// Generate meta tags
let meta_tags = MetaTagsBuilder::new()
.with_title("My Page")
.with_description("Page content")
.build()?;
// Generate structured data
let structured_data = generate_structured_data(html, None)?;
Structs§
- Builder for constructing meta tags.
- Configuration options for structured data generation.
Functions§
- Escapes HTML special characters in a string.
- Generates meta tags for SEO purposes.
- Generates structured data (JSON-LD) for SEO purposes.