UNPKG

metax

Version:

Add SEO and other metadata tags to your Gatsby website.

14 lines (12 loc) 325 B
/** * @param {Array|string} content */ const keywordsMeta = ({ content, type }) => { const allowedTypes = ["article", "book"] return { content: Array.isArray(content) ? content.join(",") : content, name: "keywords", property: allowedTypes.includes(type) && `${type}:tag`, } } export default keywordsMeta