Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
11282daa38 | |||
1fe7dd8d06 | |||
9175cb7841 | |||
6b9ebcec7a |
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/websetup",
|
"name": "@pushrocks/websetup",
|
||||||
"version": "3.0.11",
|
"version": "3.0.13",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/websetup",
|
"name": "@pushrocks/websetup",
|
||||||
"version": "3.0.11",
|
"version": "3.0.13",
|
||||||
"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,8 +3,18 @@ import * as plugins from '../websetup.plugins';
|
|||||||
export interface IMetaObject {
|
export interface IMetaObject {
|
||||||
title: string;
|
title: string;
|
||||||
description?: string;
|
description?: string;
|
||||||
twitterHandle?: string;
|
|
||||||
canonicalDomain?: string;
|
canonicalDomain?: string;
|
||||||
ldCompany?: plugins.tsclass.business.ICompany;
|
ldCompany?: plugins.tsclass.business.ICompany;
|
||||||
ldProduct?: any;
|
ldProduct?: any;
|
||||||
|
|
||||||
|
// handles
|
||||||
|
twitterHandle?: string;
|
||||||
|
facebookHandle?: string;
|
||||||
|
|
||||||
|
// links
|
||||||
|
companyWebsiteLink?: string;
|
||||||
|
googleNewsLink?: string;
|
||||||
|
mediumLink?: string;
|
||||||
|
slackLink?: string;
|
||||||
|
airmeetLink?: string;
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@ import * as plugins from './websetup.plugins';
|
|||||||
import { Tag } from './websetup.classes.tag';
|
import { Tag } from './websetup.classes.tag';
|
||||||
|
|
||||||
export class OpengraphTag extends Tag {
|
export class OpengraphTag extends Tag {
|
||||||
public static createNewsArticleOgTags (newsArticleArg: plugins.tsclass.content.IArticle) {
|
public static createNewsArticleOgTags(newsArticleArg: plugins.tsclass.content.IArticle) {
|
||||||
const tagArray: OpengraphTag[] = [];
|
const tagArray: OpengraphTag[] = [];
|
||||||
tagArray.push(new OpengraphTag('og:url', newsArticleArg.url));
|
tagArray.push(new OpengraphTag('og:url', newsArticleArg.url));
|
||||||
tagArray.push(new OpengraphTag('og:title', newsArticleArg.title));
|
tagArray.push(new OpengraphTag('og:title', newsArticleArg.title));
|
||||||
|
@ -16,7 +16,7 @@ export class TagManager {
|
|||||||
// global tag level
|
// global tag level
|
||||||
this.globalLevel.addTag(new MetaTag('google', 'notranslate'));
|
this.globalLevel.addTag(new MetaTag('google', 'notranslate'));
|
||||||
this.globalLevel.addTag(new MetaTag('revisit-after', '1 days'));
|
this.globalLevel.addTag(new MetaTag('revisit-after', '1 days'));
|
||||||
|
|
||||||
if (metaObjectArg.twitterHandle) {
|
if (metaObjectArg.twitterHandle) {
|
||||||
this.globalLevel.addTag(new MetaTag('twitter:card', 'summary_large_image'));
|
this.globalLevel.addTag(new MetaTag('twitter:card', 'summary_large_image'));
|
||||||
this.globalLevel.addTag(new MetaTag('twitter:site', metaObjectArg.twitterHandle));
|
this.globalLevel.addTag(new MetaTag('twitter:site', metaObjectArg.twitterHandle));
|
||||||
|
Reference in New Issue
Block a user