Skip to main content

Module metatags

Module metatags 

Source
Expand description

The metatags module contains functions for generating meta tags. Meta tag generation and extraction module.

This module provides functionality for generating HTML meta tags from metadata and extracting meta tags from HTML content.

Rendering follows the specifications the tags come from: Open Graph (og:*, article:*, fb:*, profile:*, book:*, music:*, video:*) uses the property attribute, everything else uses name, and both attribute values go through crate::escape_attribute.

Structs§

MetaTag
One <meta> element: its identifier and content.
MetaTagGroups
Holds collections of meta tags for different platforms and categories.

Enums§

MetaAttribute
Which attribute carries a meta tag’s identifier.

Functions§

extract_meta_tagshtml
Extracts <meta> tags from HTML content in one streaming pass (feature html).
extract_meta_tags_lenienthtml
Like extract_meta_tags, but also reports where a malformed document stopped the scan (feature html).
generate_metatags
Generates all meta tag groups from the given metadata.
meta_tags_to_hashmap
Converts a list of tags into a map from identifier to content.