Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
2f4fd839a1 | |||
bd8585aa42 |
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/websetup",
|
"name": "@pushrocks/websetup",
|
||||||
"version": "3.0.17",
|
"version": "3.0.18",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "setup basic page properties",
|
"description": "setup basic page properties",
|
||||||
"main": "dist_ts/index.js",
|
"main": "dist_ts/index.js",
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@pushrocks/websetup',
|
name: '@pushrocks/websetup',
|
||||||
version: '3.0.17',
|
version: '3.0.18',
|
||||||
description: 'setup basic page properties'
|
description: 'setup basic page properties'
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,16 @@ export class OpengraphTag extends Tag {
|
|||||||
return tagArray;
|
return tagArray;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static createProductOgTags(productArg: plugins.tsclass.saas.IProduct) {
|
||||||
|
const tagArray: OpengraphTag[] = [];
|
||||||
|
tagArray.push(new OpengraphTag('og:url', globalThis.location.href));
|
||||||
|
tagArray.push(new OpengraphTag('og:title', productArg.name));
|
||||||
|
tagArray.push(new OpengraphTag('og:site_name', productArg.name))
|
||||||
|
tagArray.push(new OpengraphTag('og:description', productArg.description));
|
||||||
|
tagArray.push(new OpengraphTag('og:image', productArg.logoLink));
|
||||||
|
return tagArray;
|
||||||
|
}
|
||||||
|
|
||||||
constructor(propertyNameArg: string, contentArg: string) {
|
constructor(propertyNameArg: string, contentArg: string) {
|
||||||
super();
|
super();
|
||||||
const openGraphElement = document.createElement('meta');
|
const openGraphElement = document.createElement('meta');
|
||||||
|
@ -82,6 +82,7 @@ export class TagLevel {
|
|||||||
|
|
||||||
public addProductInfo(productArg: plugins.tsclass.saas.IProduct, companyArg: plugins.tsclass.business.ICompany) {
|
public addProductInfo(productArg: plugins.tsclass.saas.IProduct, companyArg: plugins.tsclass.business.ICompany) {
|
||||||
this.addTag(JsonLdTag.createProductJsonLd(productArg, companyArg));
|
this.addTag(JsonLdTag.createProductJsonLd(productArg, companyArg));
|
||||||
|
this.addTag(OpengraphTag.createProductOgTags(productArg));
|
||||||
}
|
}
|
||||||
|
|
||||||
public async enable() {
|
public async enable() {
|
||||||
|
Reference in New Issue
Block a user