Auto Tags
Whitepapper automatically generates meta tags and JSON-LD structured data for every public paper. This page documents the exact output and the logic behind it.
How It Works
When a paper is rendered as a public page, the system checks whether the paper has custom metadata. If paper.metadata is populated, those values are used. Otherwise, the system infers metadata from the paper's title, body, and timestamps.
The metadata pipeline:
- Read
paper.metadatafrom the database. - Fill missing fields with inferred values (title → headline, body → description, etc.).
- Build Open Graph tags, Twitter Card tags, and JSON-LD from the resolved metadata.
- Render everything into the page
<head>.
Meta Tags Output
Standard Meta Tags
<title>{metadata.title}</title>
<meta name="description" content="{metadata.metaDescription}" />
<meta name="author" content="{metadata.authorName}" />
<meta name="keywords" content="{metadata.keywords}" />
<meta name="robots" content="{metadata.robots}" />
<link rel="canonical" href="{metadata.canonical}" />Open Graph Tags
<meta property="og:type" content="article" />
<meta property="og:site_name" content="Whitepapper" />
<meta property="og:title" content="{metadata.ogTitle}" />
<meta property="og:description" content="{metadata.ogDescription}" />
<meta property="og:url" content="{metadata.canonical}" />
<meta property="og:locale" content="{metadata.ogLocale}" />
<meta property="og:image" content="{metadata.ogImage}" />
<meta property="og:image:width" content="{metadata.ogImageWidth}" />
<meta property="og:image:height" content="{metadata.ogImageHeight}" />
<meta property="og:image:alt" content="{metadata.ogImageAlt}" />
<meta property="og:updated_time" content="{metadata.ogModifiedTime}" />
<meta property="article:published_time" content="{metadata.datePublished}" />
<meta property="article:modified_time" content="{metadata.dateModified}" />
<meta property="article:section" content="{metadata.articleSection}" />
<meta property="article:author" content="{metadata.authorUrl}" />
<meta property="article:tag" content="{metadata.ogTags}" />Twitter Card Tags
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:url" content="{metadata.canonical}" />
<meta name="twitter:title" content="{metadata.twitterTitle}" />
<meta name="twitter:description" content="{metadata.twitterDescription}" />
<meta name="twitter:image" content="{metadata.twitterImage}" />
<meta name="twitter:image:alt" content="{metadata.twitterImageAlt}" />
<meta name="twitter:creator" content="{metadata.twitterCreator}" />JSON-LD Output
Two JSON-LD blocks are rendered: an Article (or BlogPosting) schema and a BreadcrumbList.
Article Schema
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "{metadata.headline}",
"description": "{metadata.metaDescription}",
"abstract": "{metadata.abstract}",
"keywords": "{metadata.keywords}",
"articleSection": "{metadata.articleSection}",
"wordCount": {metadata.wordCount},
"inLanguage": "{metadata.inLanguage}",
"isAccessibleForFree": {metadata.isAccessibleForFree},
"license": "{metadata.license}",
"url": "{metadata.canonical}",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "{metadata.canonical}"
},
"datePublished": "{metadata.datePublished}",
"dateModified": "{metadata.dateModified}",
"author": {
"@type": "Person",
"name": "{metadata.authorName}",
"url": "{metadata.authorUrl}"
},
"image": {
"@type": "ImageObject",
"url": "{metadata.coverImageUrl}",
"width": {metadata.ogImageWidth},
"height": {metadata.ogImageHeight}
},
"publisher": {
"@type": "Organization",
"name": "Whitepapper",
"url": "https://whitepapper.antk.in",
"logo": {
"@type": "ImageObject",
"url": "https://whitepapper.antk.in/appLogo.png",
"width": 200,
"height": 60
}
}
}The @type switches to "BlogPosting" when the paper is published under the blogs route.
BreadcrumbList Schema
{
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [
{
"@type": "ListItem",
"position": 1,
"name": "Home",
"item": "https://whitepapper.antk.in"
},
{
"@type": "ListItem",
"position": 2,
"name": "{section}",
"item": "https://whitepapper.antk.in/{section}"
},
{
"@type": "ListItem",
"position": 3,
"name": "{paper-title}",
"item": "https://whitepapper.antk.in/{paper-slug}"
}
]
}Fallback Logic
When metadata fields are null or empty, the system infers values:
| Field | Fallback Source |
|---|---|
metaDescription | First 160 characters of body (stripped of Markdown) |
headline | Paper title, or first words of body |
ogImage | paper.thumbnailUrl, or app logo |
wordCount | Count of words in body |
readingTimeMinutes | Estimated from word count |
datePublished | paper.createdAt |
dateModified | paper.updatedAt |
Custom Metadata
If you want to override any auto-generated tag, set custom metadata in the editor sidebar. See Custom Metatags.
Related
- Custom Metatags — Override auto-generated tags.
- Entities — PaperMetadata type definition.