A Vite plugin that automatically generates Open Graph meta tags into your HTML head based on a configuration object. Current stable version is 2.0.6, targeting Vite 5+ (requires Node >=16). It supports Twitter Card, Facebook app ID, and full Open Graph protocol fields with TypeScript types included. Differentiators: simple declarative config, no runtime overhead (build-time injection), and first-class type support. Release cadence is irregular, mostly bug fixes and minor feature additions.
npm install vite-plugin-open-graphVerified import paths — ran on the pinned version, not inferred.
Configures the plugin with basic OG meta, Twitter Card, and Facebook app ID, generating appropriate <meta> tags in the HTML head.
Upgrade Vite to version 5 or higher.
Ensure Node version is >=16.
No action needed.
Install the plugin in the root node_modules or use workspaces correctly.
Set 'basic.type' to a valid OG type; see https://ogp.me/#types.
Provide a fully qualified URL (absolute or relative to the site base).
Run 'npm install vite-plugin-open-graph --save-dev' (or yarn/pnpm equivalent).
Use 'import ogPlugin from 'vite-plugin-open-graph'' (default import).
Use 'import type { Options } from 'vite-plugin-open-graph''.Ensure TypeScript is configured with 'moduleResolution': 'node' (or 'bundler') and that the package is installed.
The plugin automatically injects meta tags during build. No manual generation needed.
No dependency data recorded yet.