[Library|Trunk]

update meta urls and canonicalurl to get domain from properties  instead of baseLink to work for community gateways



git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@59403 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2020-09-16 13:50:16 +00:00
parent a9cb541994
commit c22e64c46c
13 changed files with 20 additions and 20 deletions

View File

@ -241,7 +241,7 @@ export class DepositFirstPageComponent {
this.route.data this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => { .subscribe((data: { envSpecific: EnvProperties }) => {
this.properties = data.envSpecific; this.properties = data.envSpecific;
this.url = this.properties.baseLink+this._router.url; this.url = this.properties.domain+this._router.url;
this.seoService.createLinkForCanonicalURL(this.url, false); this.seoService.createLinkForCanonicalURL(this.url, false);
var description = "Find the appropriate repository or journal or use Zenodo repository to deposit your research and publish in the Open Access journals that suit your needs."; var description = "Find the appropriate repository or journal or use Zenodo repository to deposit your research and publish in the Open Access journals that suit your needs.";

View File

@ -63,7 +63,7 @@ export class ErrorPageComponent {
this.route.data this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => { .subscribe((data: { envSpecific: EnvProperties }) => {
let properties = data.envSpecific; let properties = data.envSpecific;
this.seoService.createLinkForCanonicalURL(properties.baseLink + "/error"); this.seoService.createLinkForCanonicalURL(properties.domain + "/error");
this.route.queryParams.subscribe(data => { this.route.queryParams.subscribe(data => {
this.page = data['page']; this.page = data['page'];

View File

@ -161,7 +161,7 @@ export class DataProviderComponent {
} }
//this.getDivContents(); //this.getDivContents();
this.getPageContents(); this.getPageContents();
this.updateUrl(this.properties.baseLink + this._router.url); this.updateUrl(this.properties.domain + this._router.url);
this.sub = this.route.queryParams.subscribe(data => { this.sub = this.route.queryParams.subscribe(data => {
this.updateTitle("Content provider"); this.updateTitle("Content provider");
this.updateDescription(""); this.updateDescription("");
@ -247,7 +247,7 @@ export class DataProviderComponent {
this.subInfo = this._dataproviderService.getDataproviderInfo(this.datasourceId, this.properties).subscribe( this.subInfo = this._dataproviderService.getDataproviderInfo(this.datasourceId, this.properties).subscribe(
data => { data => {
this.dataProviderInfo = data; this.dataProviderInfo = data;
this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this._router.url); this.seoService.createLinkForCanonicalURL(this.properties.domain + this._router.url);
if (typeof document !== 'undefined') { if (typeof document !== 'undefined') {
this.getDataProviderAggregationStatus(this.dataProviderInfo.originalId); this.getDataProviderAggregationStatus(this.dataProviderInfo.originalId);
} else { } else {
@ -282,7 +282,7 @@ export class DataProviderComponent {
} }
this.errorMessage = 'No dataProvider found'; this.errorMessage = 'No dataProvider found';
this.showLoading = false; this.showLoading = false;
this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this.properties.searchLinkToDataProviders); this.seoService.createLinkForCanonicalURL(this.properties.domain + this.properties.searchLinkToDataProviders);
} }
); );
} }

View File

@ -92,7 +92,7 @@ export class HtmlProjectReportComponent {
//this.getDivContents(); //this.getDivContents();
this.getPageContents(); this.getPageContents();
this.updateUrl(data.envSpecific.baseLink + this._router.url); this.updateUrl(data.envSpecific.baseLink + this._router.url);
this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this._router.url); this.seoService.createLinkForCanonicalURL(this.properties.domain + this._router.url);
}); });
this.sub = this.route.queryParams.subscribe(params => { this.sub = this.route.queryParams.subscribe(params => {

View File

@ -333,7 +333,7 @@ export class OrganizationComponent {
this.errorMessage = 'No organization found'; this.errorMessage = 'No organization found';
} else { } else {
this.organizationInfo = data; this.organizationInfo = data;
this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this.properties.searchLinkToOrganization + this.organizationInfo.relcanId); this.seoService.createLinkForCanonicalURL(this.properties.domain + this.properties.searchLinkToOrganization + this.organizationInfo.relcanId);
this.updateTitle((this.organizationInfo.title.name?this.organizationInfo.title.name:(this.organizationInfo.name?this.organizationInfo.name:'No title available'))); this.updateTitle((this.organizationInfo.title.name?this.organizationInfo.title.name:(this.organizationInfo.name?this.organizationInfo.name:'No title available')));
this.updateDescription("Organization, country, " + this.updateDescription("Organization, country, " +
(this.organizationInfo.title.name?this.organizationInfo.title.name:'No title available') + (this.organizationInfo.title.name?this.organizationInfo.title.name:'No title available') +
@ -364,7 +364,7 @@ export class OrganizationComponent {
} }
}); });
} }
this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this.properties.searchLinkToOrganizations); this.seoService.createLinkForCanonicalURL(this.properties.domain + this.properties.searchLinkToOrganizations);
this.errorMessage = 'No organization found'; this.errorMessage = 'No organization found';
this.showLoading = false; this.showLoading = false;
} }

View File

@ -356,7 +356,7 @@ export class ProjectComponent {
if(err.status == 404) { if(err.status == 404) {
this._router.navigate(['/error'], {queryParams: {"page": this._location.path(true), "page_type": "project"}}); this._router.navigate(['/error'], {queryParams: {"page": this._location.path(true), "page_type": "project"}});
} }
this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this.properties.searchLinkToProjects); this.seoService.createLinkForCanonicalURL(this.properties.domain + this.properties.searchLinkToProjects);
this.errorMessage = 'No project found'; this.errorMessage = 'No project found';
this.showLoading = false; this.showLoading = false;
} }
@ -385,7 +385,7 @@ export class ProjectComponent {
if(err.status == 404) { if(err.status == 404) {
this._router.navigate(['/error'], {queryParams: {"page": this._location.path(true), "page_type": "project"}}); this._router.navigate(['/error'], {queryParams: {"page": this._location.path(true), "page_type": "project"}});
} }
this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this.properties.searchLinkToProjects); this.seoService.createLinkForCanonicalURL(this.properties.domain + this.properties.searchLinkToProjects);
this.errorMessage = 'No project found'; this.errorMessage = 'No project found';
this.showLoading = false; this.showLoading = false;
} }
@ -397,7 +397,7 @@ export class ProjectComponent {
if (this.projectName == undefined || this.projectName == '') { if (this.projectName == undefined || this.projectName == '') {
this.projectName = this.projectInfo.title; this.projectName = this.projectInfo.title;
} }
this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this._router.url); this.seoService.createLinkForCanonicalURL(this.properties.domain + this._router.url);
this.updateTitle(this.projectName); this.updateTitle(this.projectName);
this.updateDescription(this.projectInfo.description?this.projectInfo.description: ("project" + (this.projectInfo.title?"," + this.projectInfo.title:"") + (this.projectInfo.funding && this.projectInfo.funding.funderName?", funder: " + this.projectInfo.funding.funderName:"") + (this.projectInfo.acronym?"," + this.projectInfo.acronym:""))); this.updateDescription(this.projectInfo.description?this.projectInfo.description: ("project" + (this.projectInfo.title?"," + this.projectInfo.title:"") + (this.projectInfo.funding && this.projectInfo.funding.funderName?", funder: " + this.projectInfo.funding.funderName:"") + (this.projectInfo.acronym?"," + this.projectInfo.acronym:"")));
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) { if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {

View File

@ -129,7 +129,7 @@ export class ResultLandingComponent {
} }
//this.getDivContents(); //this.getDivContents();
this.getPageContents(); this.getPageContents();
this.updateUrl(this.properties.baseLink + this._router.url); this.updateUrl(this.properties.domain + this._router.url);
this.sub = this.route.queryParams.subscribe(data => { this.sub = this.route.queryParams.subscribe(data => {
this.resultLandingInfo = null; this.resultLandingInfo = null;
if (data['articleId']) { if (data['articleId']) {
@ -321,7 +321,7 @@ export class ResultLandingComponent {
if (this.type == "result") { // no type was specified - update URL based this.resultLandingInfo.resultType if (this.type == "result") { // no type was specified - update URL based this.resultLandingInfo.resultType
this.updateUrlWithType(); this.updateUrlWithType();
} }
this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this.linkToLandingPage + this.resultLandingInfo.relcanId); this.seoService.createLinkForCanonicalURL(this.properties.domain + this.linkToLandingPage + this.resultLandingInfo.relcanId);
if ((this.type == "publication") && (this.properties.environment == "beta" || this.properties.environment == "development") && (typeof document !== 'undefined')) { if ((this.type == "publication") && (this.properties.environment == "beta" || this.properties.environment == "development") && (typeof document !== 'undefined')) {
this.getOpenCitations(); this.getOpenCitations();
} }
@ -369,7 +369,7 @@ export class ResultLandingComponent {
this.errorMessage += "No research product found"; this.errorMessage += "No research product found";
} }
this.showLoading = false; this.showLoading = false;
this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this.linkToSearchPage); this.seoService.createLinkForCanonicalURL(this.properties.domain + this.linkToSearchPage);
} }
); );
} }

View File

@ -134,7 +134,7 @@ export class SearchComponent {
this._meta.updateTag({content: description}, "property='og:description'"); this._meta.updateTag({content: description}, "property='og:description'");
this._meta.updateTag({content: title}, "property='og:title'"); this._meta.updateTag({content: title}, "property='og:title'");
this._meta.updateTag({content: url}, "property='og:url'"); this._meta.updateTag({content: url}, "property='og:url'");
this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this._router.url, false); this.seoService.createLinkForCanonicalURL(this.properties.domain + this._router.url, false);
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) { if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
this.subs.push(this._piwikService.trackView(this.properties, "OpenAIRE |Search publications, research data, projects...", this.piwikSiteId).subscribe()); this.subs.push(this._piwikService.trackView(this.properties, "OpenAIRE |Search publications, research data, projects...", this.piwikSiteId).subscribe());

View File

@ -153,7 +153,7 @@ export class SearchAllComponent {
this._meta.updateTag({content: description}, "property='og:description'"); this._meta.updateTag({content: description}, "property='og:description'");
this._meta.updateTag({content: title}, "property='og:title'"); this._meta.updateTag({content: title}, "property='og:title'");
this._meta.updateTag({content: url}, "property='og:url'"); this._meta.updateTag({content: url}, "property='og:url'");
this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this._router.url, false); this.seoService.createLinkForCanonicalURL(this.properties.domain + this._router.url, false);
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) { if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
this.subs.push(this._piwikService.trackView(this.properties, title, this.piwikSiteId).subscribe()); this.subs.push(this._piwikService.trackView(this.properties, title, this.piwikSiteId).subscribe());

View File

@ -97,7 +97,7 @@ export class AdvancedSearchPageComponent {
this.searchUtils.baseUrl = "/" + this.searchUtils.baseUrl; this.searchUtils.baseUrl = "/" + this.searchUtils.baseUrl;
this.updateBaseUrlWithParameters(); this.updateBaseUrlWithParameters();
this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this.router.url, false); this.seoService.createLinkForCanonicalURL(this.properties.domain + this.router.url, false);
} }

View File

@ -173,7 +173,7 @@ export class NewSearchPageComponent {
} }
this.searchUtils.baseUrl = "/" + this.searchUtils.baseUrl; this.searchUtils.baseUrl = "/" + this.searchUtils.baseUrl;
this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this.router.url, false); this.seoService.createLinkForCanonicalURL(this.properties.domain + this.router.url, false);
this.breadcrumbs.push({name: 'home', route: '/'}); this.breadcrumbs.push({name: 'home', route: '/'});
if(this.simpleView) { if(this.simpleView) {
this.breadcrumbs.push( {name: "Search", route: null}); this.breadcrumbs.push( {name: "Search", route: null});

View File

@ -117,7 +117,7 @@ export class SearchPageComponent {
this.updateTitle(this.pageTitle); this.updateTitle(this.pageTitle);
var description = "Openaire, search, repositories, open access, type, content provider, funder, project, " + this.type + "," +this.pageTitle; var description = "Openaire, search, repositories, open access, type, content provider, funder, project, " + this.type + "," +this.pageTitle;
this.updateDescription(description); this.updateDescription(description);
this.seoService.createLinkForCanonicalURL(this.properties.baseLink+this.router.url,false); this.seoService.createLinkForCanonicalURL(this.properties.domain+this.router.url,false);
} }
private getPageContents() { private getPageContents() {

View File

@ -114,7 +114,7 @@ export class SearchPageTableViewComponent implements OnInit, AfterViewInit {
this.updateTitle(this.pageTitle); this.updateTitle(this.pageTitle);
var description = "Openaire, search, repositories, open access, type, content provider, funder, project, " + this.type + "," +this.pageTitle; var description = "Openaire, search, repositories, open access, type, content provider, funder, project, " + this.type + "," +this.pageTitle;
this.updateDescription(description); this.updateDescription(description);
this.seoService.createLinkForCanonicalURL(this.properties.baseLink+this.router.url,false); this.seoService.createLinkForCanonicalURL(this.properties.domain+this.router.url,false);
this.breadcrumbs.push({name: 'home', route: '/'}, {name: this.pageTitle, route: null}); this.breadcrumbs.push({name: 'home', route: '/'}, {name: this.pageTitle, route: null});