pub fn has_meta_tag(html: &str, attr: &str) -> boolExpand description
Check for an actual <meta tag (not just an HTML comment marker).
Staticdatagen may emit empty comment blocks like:
<!-- # Start Open Graph / Facebook Meta Tags -->
<!-- # End Open Graph / Facebook Meta Tags -->These should NOT count as “tag present” — only real <meta tags do.
§Examples
use ssg::seo::helpers::has_meta_tag;
let html = r#"<meta property="og:title" content="x">"#;
assert!(has_meta_tag(html, "og:title"));
assert!(!has_meta_tag("<!-- og:image -->", "og:image"));