__smm_static_temp_content__

OpenGraph

The og field in smm.config.json controls Open Graph meta tags in the generated HTML. These tags control how your site appears when shared on social platforms (Twitter, Discord, Telegram, etc.) and in search results.

Schema

interface OpenGraph {
  title?: string;
  type?: string;
  url?: string;
  description?: string;
  site_name?: string;
  determiner?: "a" | "an" | "the" | "auto" | "";
  locale?: string;
  "locale:alternate"?: string[];

  images?: OpenGraphImage[];
  videos?: OpenGraphVideo[];
  audios?: OpenGraphAudio[];
}

interface OpenGraphImage {
  image: string;
  "image:secure_url"?: string;
  "image:type"?: string;
  "image:width"?: number;
  "image:height"?: number;
  "image:alt"?: string;
}

interface OpenGraphVideo {
  video: string;
  "video:secure_url"?: string;
  "video:type"?: string;
  "video:width"?: number;
  "video:height"?: number;
}

interface OpenGraphAudio {
  audio: string;
  "audio:secure_url"?: string;
  "audio:type"?: string;
}

Basic usage

{
  "og": {
    "title": "My Docs",
    "description": "Documentation for my project.",
    "type": "website",
    "site_name": "My Docs"
  }
}

This generates:

<meta property="og:title" content="My Docs">
<meta property="og:description" content="Documentation for my project.">
<meta property="og:type" content="website">
<meta property="og:site_name" content="My Docs">

With images

{
  "og": {
    "title": "My Docs",
    "description": "Documentation for my project.",
    "images": [
      {
        "image": "https://example.com/og-image.png",
        "image:width": 1200,
        "image:height": 630,
        "image:alt": "My Docs preview"
      }
    ]
  }
}

With videos and audio

{
  "og": {
    "title": "Video Docs",
    "videos": [
      {
        "video": "https://example.com/trailer.mp4",
        "video:type": "video/mp4"
      }
    ],
    "audios": [
      {
        "audio": "https://example.com/song.mp3",
        "audio:type": "audio/mpeg"
      }
    ]
  }
}

Locale

{
  "og": {
    "locale": "en_US",
    "locale:alternate": ["fr_FR", "es_ES"]
  }
}

How it works

The CLI reads the og field from smm.config.json and renders each entry as <meta property="og:key" content="value"> tags in the HTML <head>. Arrays (like locale:alternate) produce one meta tag per value. Image, video, and audio objects render their properties as flat og:* meta tags.