gatsby-plugin-next-seo
Version:
SEO plugin for Gatsby projects
74 lines • 1.86 kB
TypeScript
import { FC } from 'react';
import { FAQPage } from 'schema-dts';
import { DeferSeoProps } from '../types';
import { Overrides } from '../utils/shared-types';
/**
* The FAQPage JSON LD Component props.
*
* @public
*/
export interface FAQJsonLdProps extends DeferSeoProps, Overrides<FAQPage> {
/**
* An array of Question elements which comprise the list of answered questions
* that this FAQPage is about.
*/
questions: Question[];
}
/**
* The questions and answers for an FAQ Page.
*
* @public
*/
export interface Question {
/**
* The full text of the question. For example, "How long does it take to
* process a refund?".
*/
question: string;
/**
* The answer to the question. There must be one answer per question.
*
* @remarks
*
* The answer may contain HTML content such as links and lists. Valid HTML
* tags include: <h1> through <h6>, <br>, <ol>, <ul>, <li>, <a>, <p>, <div>,
* <b>, <strong>, <i>, and <em>.
*/
answer: string;
}
/**
* A Frequently Asked Question (FAQ) page contains a list of questions and
* answers pertaining to a particular topic.
*
* @remarks
*
* Properly marked up FAQ pages may be eligible to have a rich result on Search
* and voice assistants.
*
* ```tsx
* import React from 'react';
* import { FAQJsonLd } from 'gatsby-plugin-next-seo';
*
* export default () => (
* <>
* <FAQJsonLd mainEntity={[{ question: 'What?', answer: 'Stand' }, { question:
* 'How?', answer: 'Effort' }, { question: 'Why?', answer: 'Peace' },
* ]}
* />
*
* <h1>What?</h1>
* <p>Stand</p>
*
* <h1>How?</h1>
* <p>Effort</p>
*
* <h1>Why?</h1>
* <p>Peace</p>
* </>
* );
* ```
*
* @public
*/
export declare const FAQJsonLd: FC<FAQJsonLdProps>;
//# sourceMappingURL=faq.d.ts.map