@forge42/seo-tools
Version:
Framework agnostic set of helpers designed to help you create, maintain and develop your SEO
1 lines • 1.01 kB
Source Map (JSON)
{"version":3,"sources":["../../src/structured-data/article.ts"],"sourcesContent":["import type { Article, WithContext } from \"schema-dts\"\n\n/**\n * This helper is used to generate an article ld+json structured data object.\n *\n *\n * Find more information about the article schema here:\n * https://developers.google.com/search/docs/appearance/structured-data/article\n *\n * Article objects must be based on one of the following schema.org types: Article, NewsArticle, BlogPosting.\n * - Article: https://schema.org/Article\n * - NewsArticle: https://schema.org/NewsArticle\n * - BlogPosting: https://schema.org/BlogPosting\n *\n * @param article Article object\n * @returns Article object to be used in head via json-ld script tag\n */\nexport const article = (article: Article): WithContext<Article> => {\n\treturn {\n\t\t\"@context\": \"https://schema.org\",\n\t\t...article,\n\t}\n}\n\nexport type { Article }\n"],"mappings":"AAiBO,IAAMA,EAAWA,IAChB,CACN,WAAY,qBACZ,GAAGA,CACJ","names":["article"]}