update npmextra.json: githost

This commit is contained in:
Philipp Kunz 2024-03-30 21:49:21 +01:00
parent 6acfddb70d
commit 2f04d66ec5
3 changed files with 17 additions and 5 deletions

View File

@ -6,11 +6,11 @@
"gitzone": { "gitzone": {
"projectType": "npm", "projectType": "npm",
"module": { "module": {
"githost": "gitlab.com", "githost": "code.foss.global",
"gitscope": "pushrocks", "gitscope": "push.rocks",
"gitrepo": "websetup", "gitrepo": "websetup",
"description": "setup basic page properties", "description": "setup basic page properties",
"npmPackagename": "@pushrocks/websetup", "npmPackagename": "@push.rocks/websetup",
"license": "MIT" "license": "MIT"
} }
} }

View File

@ -1,5 +1,5 @@
{ {
"name": "@pushrocks/websetup", "name": "@push.rocks/websetup",
"version": "3.0.19", "version": "3.0.19",
"private": false, "private": false,
"description": "setup basic page properties", "description": "setup basic page properties",
@ -43,4 +43,4 @@
"last 1 chrome versions" "last 1 chrome versions"
], ],
"type": "module" "type": "module"
} }

View File

@ -13,6 +13,7 @@ export class OpengraphTag extends Tag {
public static createProductOgTags(productArg: plugins.tsclass.saas.IProduct) { public static createProductOgTags(productArg: plugins.tsclass.saas.IProduct) {
const tagArray: OpengraphTag[] = []; const tagArray: OpengraphTag[] = [];
tagArray.push(new OpengraphTag('og:type', 'product'));
tagArray.push(new OpengraphTag('og:url', globalThis.location.href)); tagArray.push(new OpengraphTag('og:url', globalThis.location.href));
tagArray.push(new OpengraphTag('og:title', `${productArg.name} - ${productArg.slogan}`)); tagArray.push(new OpengraphTag('og:title', `${productArg.name} - ${productArg.slogan}`));
tagArray.push(new OpengraphTag('og:site_name', productArg.name)) tagArray.push(new OpengraphTag('og:site_name', productArg.name))
@ -21,6 +22,17 @@ export class OpengraphTag extends Tag {
return tagArray; return tagArray;
} }
public static createCompanyOgTags(companyArg: plugins.tsclass.business.ICompany) {
const tagArray: OpengraphTag[] = [];
tagArray.push(new OpengraphTag('og:type', 'company'));
tagArray.push(new OpengraphTag('og:url', globalThis.location.href));
tagArray.push(new OpengraphTag('og:title', `${companyArg.name} - ${companyArg.slogan}`));
tagArray.push(new OpengraphTag('og:site_name', companyArg.name))
tagArray.push(new OpengraphTag('og:description', companyArg.description));
tagArray.push(new OpengraphTag('og:image', companyArg.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');