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:

  1. Read paper.metadata from the database.
  2. Fill missing fields with inferred values (title → headline, body → description, etc.).
  3. Build Open Graph tags, Twitter Card tags, and JSON-LD from the resolved metadata.
  4. Render everything into the page <head>.

Meta Tags Output

Standard Meta Tags

html
<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

html
<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

html
<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

json
{
  "@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

json
{
  "@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:

FieldFallback Source
metaDescriptionFirst 160 characters of body (stripped of Markdown)
headlinePaper title, or first words of body
ogImagepaper.thumbnailUrl, or app logo
wordCountCount of words in body
readingTimeMinutesEstimated from word count
datePublishedpaper.createdAt
dateModifiedpaper.updatedAt

Custom Metadata

If you want to override any auto-generated tag, set custom metadata in the editor sidebar. See Custom Metatags.


Related

Whitepapper logo

Whitepapper

Whitepapper is a API first content platform for developers who want to publish once, distribute everywhere, and manage website content.