[Library|Trunk]
SEO: revove 'OpenaAIRE | ' prefix from page title and metatags don't truncate the title truncate description to 160 characters git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@57820 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
80a3c32173
commit
e3722b648d
|
@ -229,18 +229,18 @@ export class DataProviderComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
private updateDescription(description: string) {
|
private updateDescription(description: string) {
|
||||||
this._meta.updateTag({content: description}, "name='description'");
|
this._meta.updateTag({content: description.substring(0, 160)}, "name='description'");
|
||||||
this._meta.updateTag({content: description}, "property='og:description'");
|
this._meta.updateTag({content: description.substring(0, 160)}, "property='og:description'");
|
||||||
}
|
}
|
||||||
|
|
||||||
private updateTitle(title: string) {
|
private updateTitle(title: string) {
|
||||||
var _prefix = "";
|
var _prefix = "";
|
||||||
if(this.communityId) {
|
// if(this.communityId) {
|
||||||
_prefix = "OpenAIRE | ";
|
// _prefix = "OpenAIRE | ";
|
||||||
}
|
// }
|
||||||
var _title = _prefix + ((title.length > 50) ? title.substring(0, 50) : title);
|
// var _title = _prefix + ((title.length > 50) ? title.substring(0, 50) : title);
|
||||||
this._title.setTitle(_title);
|
this._title.setTitle(title);
|
||||||
this._meta.updateTag({content: _title}, "property='og:title'");
|
this._meta.updateTag({content: title}, "property='og:title'");
|
||||||
}
|
}
|
||||||
|
|
||||||
private updateUrl(url: string) {
|
private updateUrl(url: string) {
|
||||||
|
|
|
@ -492,18 +492,18 @@ export class OrganizationComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
private updateDescription(description: string) {
|
private updateDescription(description: string) {
|
||||||
this._meta.updateTag({content: description}, "name='description'");
|
this._meta.updateTag({content: description.substring(0, 160)}, "name='description'");
|
||||||
this._meta.updateTag({content: description}, "property='og:description'");
|
this._meta.updateTag({content: description.substring(0, 160)}, "property='og:description'");
|
||||||
}
|
}
|
||||||
|
|
||||||
private updateTitle(title: string) {
|
private updateTitle(title: string) {
|
||||||
var _prefix = "";
|
var _prefix = "";
|
||||||
if(!this.communityId) {
|
// if(!this.communityId) {
|
||||||
_prefix = "OpenAIRE | ";
|
// _prefix = "OpenAIRE | ";
|
||||||
}
|
// }
|
||||||
var _title = _prefix + ((title.length > 50) ? title.substring(0, 50) : title);
|
// var _title = _prefix + ((title.length > 50) ? title.substring(0, 50) : title);
|
||||||
this._title.setTitle(_title);
|
this._title.setTitle(title);
|
||||||
this._meta.updateTag({content: _title}, "property='og:title'");
|
this._meta.updateTag({content: title}, "property='og:title'");
|
||||||
}
|
}
|
||||||
|
|
||||||
private updateUrl(url: string) {
|
private updateUrl(url: string) {
|
||||||
|
|
|
@ -480,18 +480,18 @@ export class ProjectComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
private updateDescription(description: string) {
|
private updateDescription(description: string) {
|
||||||
this._meta.updateTag({content: description}, "name='description'");
|
this._meta.updateTag({content: description.substring(0, 160)}, "name='description'");
|
||||||
this._meta.updateTag({content: description}, "property='og:description'");
|
this._meta.updateTag({content: description.substring(0, 160)}, "property='og:description'");
|
||||||
}
|
}
|
||||||
|
|
||||||
private updateTitle(title: string) {
|
private updateTitle(title: string) {
|
||||||
var _prefix = "";
|
var _prefix = "";
|
||||||
if(!this.communityId) {
|
// if(!this.communityId) {
|
||||||
_prefix = "OpenAIRE | ";
|
// _prefix = "OpenAIRE | ";
|
||||||
}
|
// }
|
||||||
var _title = _prefix + ((title.length > 50) ? title.substring(0, 50) : title);
|
// var _title = _prefix + ((title.length > 50) ? title.substring(0, 50) : title);
|
||||||
this._title.setTitle(_title);
|
this._title.setTitle(title);
|
||||||
this._meta.updateTag({content: _title}, "property='og:title'");
|
this._meta.updateTag({content: title}, "property='og:title'");
|
||||||
}
|
}
|
||||||
|
|
||||||
private updateUrl(url: string) {
|
private updateUrl(url: string) {
|
||||||
|
|
|
@ -324,18 +324,18 @@ export class ResultLandingComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
private updateDescription(description: string) {
|
private updateDescription(description: string) {
|
||||||
this._meta.updateTag({content: description}, "name='description'");
|
this._meta.updateTag({content: description.substring(0, 160)}, "name='description'");
|
||||||
this._meta.updateTag({content: description}, "property='og:description'");
|
this._meta.updateTag({content: description.substring(0, 160)}, "property='og:description'");
|
||||||
}
|
}
|
||||||
|
|
||||||
private updateTitle(title: string) {
|
private updateTitle(title: string) {
|
||||||
var _prefix = "";
|
var _prefix = "";
|
||||||
if(!this.communityId) {
|
// if(!this.communityId) {
|
||||||
_prefix = "OpenAIRE | ";
|
// _prefix = "OpenAIRE | ";
|
||||||
}
|
// }
|
||||||
var _title = _prefix + ((title.length > 50) ? title.substring(0, 50) : title);
|
// var _title = _prefix + ((title.length > 50) ? title.substring(0, 50) : title);
|
||||||
this._title.setTitle(_title);
|
this._title.setTitle(title);
|
||||||
this._meta.updateTag({content: _title}, "property='og:title'");
|
this._meta.updateTag({content: title}, "property='og:title'");
|
||||||
}
|
}
|
||||||
|
|
||||||
private updateUrl(url: string) {
|
private updateUrl(url: string) {
|
||||||
|
|
Loading…
Reference in New Issue