[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:
argiro.kokogiannaki 2019-12-05 16:07:07 +00:00
parent 80a3c32173
commit e3722b648d
4 changed files with 32 additions and 32 deletions

View File

@ -229,18 +229,18 @@ export class DataProviderComponent {
}
private updateDescription(description: string) {
this._meta.updateTag({content: description}, "name='description'");
this._meta.updateTag({content: description}, "property='og:description'");
this._meta.updateTag({content: description.substring(0, 160)}, "name='description'");
this._meta.updateTag({content: description.substring(0, 160)}, "property='og:description'");
}
private updateTitle(title: string) {
var _prefix = "";
if(this.communityId) {
_prefix = "OpenAIRE | ";
}
var _title = _prefix + ((title.length > 50) ? title.substring(0, 50) : title);
this._title.setTitle(_title);
this._meta.updateTag({content: _title}, "property='og:title'");
// if(this.communityId) {
// _prefix = "OpenAIRE | ";
// }
// var _title = _prefix + ((title.length > 50) ? title.substring(0, 50) : title);
this._title.setTitle(title);
this._meta.updateTag({content: title}, "property='og:title'");
}
private updateUrl(url: string) {

View File

@ -492,18 +492,18 @@ export class OrganizationComponent {
}
private updateDescription(description: string) {
this._meta.updateTag({content: description}, "name='description'");
this._meta.updateTag({content: description}, "property='og:description'");
this._meta.updateTag({content: description.substring(0, 160)}, "name='description'");
this._meta.updateTag({content: description.substring(0, 160)}, "property='og:description'");
}
private updateTitle(title: string) {
var _prefix = "";
if(!this.communityId) {
_prefix = "OpenAIRE | ";
}
var _title = _prefix + ((title.length > 50) ? title.substring(0, 50) : title);
this._title.setTitle(_title);
this._meta.updateTag({content: _title}, "property='og:title'");
// if(!this.communityId) {
// _prefix = "OpenAIRE | ";
// }
// var _title = _prefix + ((title.length > 50) ? title.substring(0, 50) : title);
this._title.setTitle(title);
this._meta.updateTag({content: title}, "property='og:title'");
}
private updateUrl(url: string) {

View File

@ -480,18 +480,18 @@ export class ProjectComponent {
}
private updateDescription(description: string) {
this._meta.updateTag({content: description}, "name='description'");
this._meta.updateTag({content: description}, "property='og:description'");
this._meta.updateTag({content: description.substring(0, 160)}, "name='description'");
this._meta.updateTag({content: description.substring(0, 160)}, "property='og:description'");
}
private updateTitle(title: string) {
var _prefix = "";
if(!this.communityId) {
_prefix = "OpenAIRE | ";
}
var _title = _prefix + ((title.length > 50) ? title.substring(0, 50) : title);
this._title.setTitle(_title);
this._meta.updateTag({content: _title}, "property='og:title'");
// if(!this.communityId) {
// _prefix = "OpenAIRE | ";
// }
// var _title = _prefix + ((title.length > 50) ? title.substring(0, 50) : title);
this._title.setTitle(title);
this._meta.updateTag({content: title}, "property='og:title'");
}
private updateUrl(url: string) {

View File

@ -324,18 +324,18 @@ export class ResultLandingComponent {
}
private updateDescription(description: string) {
this._meta.updateTag({content: description}, "name='description'");
this._meta.updateTag({content: description}, "property='og:description'");
this._meta.updateTag({content: description.substring(0, 160)}, "name='description'");
this._meta.updateTag({content: description.substring(0, 160)}, "property='og:description'");
}
private updateTitle(title: string) {
var _prefix = "";
if(!this.communityId) {
_prefix = "OpenAIRE | ";
}
var _title = _prefix + ((title.length > 50) ? title.substring(0, 50) : title);
this._title.setTitle(_title);
this._meta.updateTag({content: _title}, "property='og:title'");
// if(!this.communityId) {
// _prefix = "OpenAIRE | ";
// }
// var _title = _prefix + ((title.length > 50) ? title.substring(0, 50) : title);
this._title.setTitle(title);
this._meta.updateTag({content: title}, "property='og:title'");
}
private updateUrl(url: string) {