UNPKG

react-seo-meta-tags

Version:

SEO metatags for React apps, especially blogs built with Gatsby or NextJS

29 lines (28 loc) 1.82 kB
import * as React from 'react'; import { ReactSEOMetaTagsProps, WebsiteProps, BlogPostProps, FacebookProps, TwitterProps, CombinedProps } from './types'; /** * Compact and comprehensive SEO meta tag component for general web pages and blog articles. * Includes basic meta tags as well as Facebook and Twitter tags and JSON-LD schema. * Originally designed for a Gatsby blog. Can be used in conjunction with react-helmet. */ export declare class ReactSEOMetaTags extends React.PureComponent<ReactSEOMetaTagsProps> { /** * General tags. OG and Twitter tags both fallback on these three incase description or image is not provided. * However by the way this library works, OG and Twitter tags are both extended from the same objects so * they'll always be defined or undefined. * @param props */ renderGeneral({ title, description, image }: CombinedProps<Record<string, any>>): ("" | JSX.Element | null | undefined)[]; renderNonBlogOgTags(): JSX.Element[]; renderBlogOgTags({ datePublished, dateModified }: BlogPostProps): ("" | JSX.Element | null | undefined)[]; /** * https://developers.facebook.com/docs/sharing/webmasters/ * http://ogp.me/ * @param props */ renderFacebook(props: CombinedProps<FacebookProps>): ("" | JSX.Element | null | undefined)[]; renderTwitter(props: CombinedProps<TwitterProps>): ("" | JSX.Element | null | undefined)[]; renderBlogPostSEO(website: WebsiteProps | undefined, blogPost: BlogPostProps, props: Omit<ReactSEOMetaTagsProps, 'website' | 'blogPost'>): (JSX.Element | ("" | JSX.Element | null | undefined)[])[]; renderWebsiteSEO(website: WebsiteProps, props: Omit<ReactSEOMetaTagsProps, 'website' | 'blogPost'>): (JSX.Element | ("" | JSX.Element | null | undefined)[])[]; render(): React.ReactNode; }