[Library|Trunk]
SEO: use canonical url for jsonld in result/organization landing git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60854 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
7533e7d3ff
commit
635df208d8
|
@ -14,7 +14,7 @@
|
|||
<div *ngIf="organizationInfo != null" class="uk-grid uk-margin-remove">
|
||||
<div class="uk-width-2-3@m uk-width-1-1@s uk-padding uk-padding-remove-left uk-padding-remove-vertical uk-margin-bottom">
|
||||
<schema2jsonld *ngIf="organizationInfo" [data]=organizationInfo
|
||||
[URL]="properties.domain + properties.baseLink+this.properties.searchLinkToOrganization+organizationId"
|
||||
[URL]="properties.domain + properties.baseLink+this.properties.searchLinkToOrganization+organizationInfo.relcanId"
|
||||
type="organization"></schema2jsonld>
|
||||
<landing-header [properties]="properties" [title]="organizationInfo.title.name"
|
||||
titleClass="uk-margin-remove-bottom"
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
class="uk-width-2-3@m uk-width-1-1@s uk-padding uk-padding-remove-left uk-padding-remove-vertical uk-margin-bottom">
|
||||
<!-- schema.org-->
|
||||
<schema2jsonld *ngIf="resultLandingInfo.record" [data]=resultLandingInfo.record
|
||||
[URL]="properties.domain+ properties.baseLink +linkToLandingPage+id"></schema2jsonld>
|
||||
[URL]="canonicalUrl"></schema2jsonld>
|
||||
<landing-header [properties]="properties" [title]="resultLandingInfo.title"
|
||||
[subTitle]="resultLandingInfo.subtitle"
|
||||
[authors]="resultLandingInfo.authors" [authorLimit]="10"
|
||||
|
|
|
@ -51,6 +51,7 @@ export class ResultLandingComponent {
|
|||
|
||||
// Links for SEO
|
||||
public linkToLandingPage: string = null;
|
||||
public canonicalUrl: string = null;
|
||||
public linkToSearchPage: string = null;
|
||||
|
||||
public thresholdDescription: number = 670;
|
||||
|
@ -353,8 +354,9 @@ export class ResultLandingComponent {
|
|||
if (this.type == "result") { // no type was specified - update URL based this.resultLandingInfo.resultType
|
||||
this.updateUrlWithType(pid);
|
||||
}
|
||||
this.seoService.createLinkForCanonicalURL(this.properties.domain+ properties.baseLink + ( pid ? (this.linkToLandingPage.split("?")[0] + "?pid=" + encodeURIComponent(pid.id)):
|
||||
(this.linkToLandingPage + this.resultLandingInfo.relcanId)));
|
||||
this.canonicalUrl = this.properties.domain+ properties.baseLink + ( pid ? (this.linkToLandingPage.split("?")[0] + "?pid=" + encodeURIComponent(pid.id)):
|
||||
(this.linkToLandingPage + this.resultLandingInfo.relcanId));
|
||||
this.seoService.createLinkForCanonicalURL(this.canonicalUrl);
|
||||
if ((this.type == "publication") && (this.properties.environment == "beta" || this.properties.environment == "development") && (typeof document !== 'undefined')) {
|
||||
this.getOpenCitations();
|
||||
}
|
||||
|
@ -646,15 +648,18 @@ export class ResultLandingComponent {
|
|||
|| (this.resultLandingInfo.supplementedByResearchResults && this.resultLandingInfo.supplementedByResearchResults.length > 0)
|
||||
)
|
||||
);
|
||||
console.log("rich content " + allow)
|
||||
//spam words to exclude
|
||||
let title_authors_words = ["movie","hd","film","kimetsu", "1080p","4k","call of duty", "mobile hack", "TUBYDI"];
|
||||
let abstract_words = ["operacao-feliz-natal.blogspot.com", "moviedouban.site", "hack-expert-solution.link"];
|
||||
console.log(this.resultLandingInfo.title)
|
||||
allow = allow && !(
|
||||
(this.hasKeyword(this.resultLandingInfo.title,title_authors_words) || (this.resultLandingInfo.authors && this.hasKeyword(this.resultLandingInfo.authors.map(o => o.fullName).join(" "),title_authors_words))
|
||||
|| (this.resultLandingInfo.description && this.hasKeyword(this.resultLandingInfo.description,abstract_words))
|
||||
) &&
|
||||
(this.resultLandingInfo.publisher == "Zenodo" ||
|
||||
this.resultLandingInfo.hostedBy_collectedFrom.filter( value => {return value.downloadName && value.downloadName.indexOf("zenodo")!=-1}).length > 0));
|
||||
((this.resultLandingInfo.publisher && this.resultLandingInfo.publisher.toLowerCase() == "zenodo") ||
|
||||
this.resultLandingInfo.hostedBy_collectedFrom.filter( value => {return value.downloadName && value.downloadName.toLowerCase().indexOf("zenodo")!=-1}).length > 0));
|
||||
console.log("spam content " + allow)
|
||||
//common titles/ description / authors
|
||||
let common_titles = ["introduction", "editorial", "book reviews", "preface", "reviews", "none", "book review", "foreword", "conclusion", "review", "reply","einleitung","short notices","erratum","discussion", "letters to the editor","letter to the editor","reviews of books",":{unav)","editorial board"];
|
||||
let common_abstract = ["international audience","n/a","peer reviewed","national audience","info:eu-repo/semantics/published","-",".","graphical abstract","met lit. opg","international audience; no abstract",'<jats:p>.</jats:p>',"politics","info:eu-repo/semantics/publishedversion","copia digital. madrid : ministerio de educación, cultura y deporte, 2016",'<jats:p />',"peer-reviewed","copia digital. madrid : ministerio de educación, cultura y deporte. subdirección general de coordinación bibliotecaria, 2015","<jats:p>-</jats:p>","imperial users only","yüksek lisans"];
|
||||
|
@ -663,6 +668,7 @@ export class ResultLandingComponent {
|
|||
this.isKeyword(this.resultLandingInfo.title,common_titles) || this.isKeyword(this.resultLandingInfo.description,common_abstract) ||
|
||||
(this.resultLandingInfo.authors && this.hasKeyword(this.resultLandingInfo.authors.map(o => o.fullName).join(" "),common_authors))
|
||||
);
|
||||
console.log("common content " + allow)
|
||||
if(!allow) {
|
||||
this._meta.updateTag({content: 'noindex'}, "name='robots'");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue