Socket
Socket
Sign inDemoInstall

vuepress-plugin-open-graph

Package Overview
Dependencies
121
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.2.0 to 1.3.0

6

dist/server/index.d.ts
import type { Plugin } from '@vuepress/core';
interface OpenGraphPluginOptions {
host: string;
twitterCard?: 'summary_large_image' | 'summary';
defaultImage?: string;
twitterCard?: 'summary' | 'summary_large_image';
twitterSite?: string;
host: string;
}
export declare let openGraphPlugin: ({ defaultImage, twitterCard, twitterSite, host, }: OpenGraphPluginOptions) => Plugin;
export declare let openGraphPlugin: ({ twitterCard, defaultImage, twitterSite, host, }: OpenGraphPluginOptions) => Plugin;
export {};

@@ -1,3 +0,2 @@

export let openGraphPlugin = ({ defaultImage, twitterCard = 'summary', twitterSite, host, }) => () => ({
name: 'vuepress-plugin-open-graph',
export let openGraphPlugin = ({ twitterCard = 'summary', defaultImage, twitterSite, host, }) => () => ({
extendsPage: page => {

@@ -12,3 +11,3 @@ let head = page.frontmatter.head || [];

'meta',
{ property: 'og:description', content: page.frontmatter.description },
{ content: page.frontmatter.description, property: 'og:description' },
]);

@@ -21,4 +20,4 @@ }

{
content: new Date(page.frontmatter.date).toISOString(),
property: 'article:published_time',
content: new Date(page.frontmatter.date).toISOString(),
},

@@ -29,3 +28,3 @@ ]);

'meta',
{ property: 'og:url', content: `${host}${page.path}` },
{ content: `${host}${page.path}`, property: 'og:url' },
]);

@@ -35,7 +34,7 @@ if (page.frontmatter.image) {

'meta',
{ property: 'og:image', content: page.frontmatter.image },
{ content: page.frontmatter.image, property: 'og:image' },
]);
}
else if (defaultImage) {
head.push(['meta', { property: 'og:image', content: defaultImage }]);
head.push(['meta', { content: defaultImage, property: 'og:image' }]);
}

@@ -49,4 +48,4 @@ if (page.title) {

{
content: page.frontmatter.description,
name: 'twitter:description',
content: page.frontmatter.description,
},

@@ -59,4 +58,4 @@ ]);

{
content: page.frontmatter.image,
name: 'twitter:image',
content: page.frontmatter.image,
},

@@ -68,3 +67,3 @@ ]);

'meta',
{ name: 'twitter:image', content: '/hero-preview.png' },
{ content: '/hero-preview.png', name: 'twitter:image' },
]);

@@ -78,2 +77,3 @@ }

},
name: 'vuepress-plugin-open-graph',
});
{
"name": "vuepress-plugin-open-graph",
"description": "VuePress plugin for generating open graph meta tags",
"version": "1.2.0",
"version": "1.3.0",
"type": "module",

@@ -30,4 +30,4 @@ "keywords": [

"dependencies": {
"@vuepress/core": "2.0.0-beta.62"
"@vuepress/core": "2.0.0-beta.63"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc