pub fn generate_metadata(doc: &Document) -> TokenStream