Function pinterest

Generates Pinterest meta tags for the HTML head section.

Pinterest uses Open Graph tags as a fallback, but also has its own specific tags for rich pins and better Pinterest integration.

import { pinterest } from '@raven-js/beak/seo';

const tags = pinterest({
description: 'Check out this amazing content!',
domain: 'example.com',
imageUrl: '/my-image.jpg',
sourceUrl: '/my-page'
});
// Output:
// <meta name="pinterest:description" property="pinterest:description" content="Check out this amazing content!" />
// <meta name="pinterest:media" property="pinterest:media" content="https://example.com/my-image.jpg" />
// <meta name="pinterest:source" property="pinterest:source" content="https://example.com/my-page" />
  • Parameters

    • config: PinterestConfig

      Configuration object for Pinterest tags

    Returns string

    The generated Pinterest meta tags as an HTML string