[Connect|Trunk]

Angular.json: file replacements fixes for beta/prod
Server.ts: build and serve sitemap.xml based on domain (Other for connect.openaire.eu, other for communities)

App component: add Organization & Search Action jsonld there (Remove from connect and community home page components) 

Udpdate and  add jsonld descriptions

Remove unused Sitemap files



git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@59244 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2020-08-10 15:32:33 +00:00
parent 92c3e73608
commit db3305e4ea
17 changed files with 69 additions and 169 deletions

View File

@ -18,8 +18,7 @@
"polyfills": "src/polyfills.ts", "polyfills": "src/polyfills.ts",
"assets": [ "assets": [
"src/assets", "src/assets",
"src/robots.txt", "src/robots.txt"
"src/sitemap.xml"
], ],
"styles": [ "styles": [
"src/styles.css", "src/styles.css",
@ -136,8 +135,7 @@
], ],
"assets": [ "assets": [
"src/assets", "src/assets",
"src/robots.txt", "src/robots.txt"
"src/sitemap.xml"
] ]
} }
}, },
@ -166,6 +164,14 @@
{ {
"replace": "src/environments/environment.ts", "replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts" "with": "src/environments/environment.prod.ts"
},
{
"replace": "src/index.html",
"with": "src/index.prod.html"
},
{
"replace": "src/robots.txt",
"with": "src/robots.prod.txt"
} }
] ]
}, },
@ -174,6 +180,14 @@
{ {
"replace": "src/environments/environment.ts", "replace": "src/environments/environment.ts",
"with": "src/environments/environment.beta.ts" "with": "src/environments/environment.beta.ts"
},
{
"replace": "src/index.html",
"with": "src/index.beta.html"
},
{
"replace": "src/robots.txt",
"with": "src/robots.beta.txt"
} }
] ]
}, },

View File

@ -79,6 +79,26 @@ app.use(function (req, res, next) {
} }
next(); next();
}); });
// - Serve sitemap based on the host -
app.get('/sitemap.xml', (req, res) => {
console.log(req.get("host"));
let host = req.get("host").split(":")[0];
let connectLinks= ["/","/about/learn-how","/about/learn-in-depth", "/about/faq","/search/find/communities"];
let communityLinks= ["/","/search/find/research-outcomes","/search/advanced/research-outcomes","/participate/deposit/learn-how","/organizations", "/content"];
let sitemap = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
"<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd\">";
let urlPre = "<url>\n" +
" <loc><![CDATA[";
let urlSuf = "]]></loc>\n" +
" </url>";
for(let link of (host.indexOf("connect.openaire.eu") == -1 ?communityLinks:connectLinks)){
sitemap += urlPre + "https://" + host + link + urlSuf;
}
sitemap += "\n</urlset>";
console.log(req.secure);
res.setHeader('content-type', 'application/xml');
res.send( sitemap);
});
/* - Example Express Rest API endpoints - /* - Example Express Rest API endpoints -
app.get('/api/**', (req, res) => { }); app.get('/api/**', (req, res) => { });

View File

@ -31,6 +31,16 @@ import {ConfigurationService} from "./openaireLibrary/utils/configuration/config
[showHomeMenuItem]="false"></navbar> [showHomeMenuItem]="false"></navbar>
<customization *ngIf="properties && communityId && communityId.length > 0" [properties]="properties" <customization *ngIf="properties && communityId && communityId.length > 0" [properties]="properties"
[communityId]="communityId"></customization> [communityId]="communityId"></customization>
<schema2jsonld *ngIf="properties && showMenu && !community" [URL]="properties.baseLink"
[logoURL]="properties.baseLink+'/assets/common-assets/logo-small-connect.png'" type="home"
[searchActionRoute]="properties.searchLinkToCommunities" [searchAction]="true"
name="OpenAIRE Connect"
description="Build a Gateway for your Community: Turn Open Science into Practice. It takes your open and linked research outcomes.">
</schema2jsonld>
<schema2jsonld *ngIf="properties && showMenu && communityId && communityId.length > 0" [URL]="properties.domain"
[logoURL]="community.logoUrl" type="home" [searchActionRoute]="properties.searchLinkToResults"
[name]="community.name" [description]="community.description" >
</schema2jsonld>
<div class="custom-main-content"> <div class="custom-main-content">
<main> <main>
<router-outlet></router-outlet> <router-outlet></router-outlet>
@ -167,7 +177,8 @@ export class AppComponent {
this.community = { this.community = {
id: community.communityId, id: community.communityId,
name: (community.shortTitle) ? community.shortTitle : community.title, name: (community.shortTitle) ? community.shortTitle : community.title,
logoUrl: community.logoUrl logoUrl: community.logoUrl,
description:community.description
}; };
this.menuItems = []; this.menuItems = [];

View File

@ -27,6 +27,7 @@ import {PageURLResolverComponent} from "./openaireLibrary/utils/pageURLResolver.
import {InviteBasicModule} from "./utils/subscribe/invite/inviteBasic.module"; import {InviteBasicModule} from "./utils/subscribe/invite/inviteBasic.module";
import {SubscribeService} from "./openaireLibrary/utils/subscribe/subscribe.service"; import {SubscribeService} from "./openaireLibrary/utils/subscribe/subscribe.service";
import {PageURLResolverModule} from "./openaireLibrary/utils/pageURLResolver.module"; import {PageURLResolverModule} from "./openaireLibrary/utils/pageURLResolver.module";
import {Schema2jsonldModule} from "./openaireLibrary/sharedComponents/schema2jsonld/schema2jsonld.module";
@NgModule({ @NgModule({
@ -45,7 +46,7 @@ import {PageURLResolverModule} from "./openaireLibrary/utils/pageURLResolver.mod
AppRoutingModule, AppRoutingModule,
BrowserTransferStateModule, BrowserTransferStateModule,
BrowserAnimationsModule, BrowserAnimationsModule,
PageURLResolverModule PageURLResolverModule, Schema2jsonldModule
], ],
declarations: [ AppComponent, OpenaireErrorPageComponent], declarations: [ AppComponent, OpenaireErrorPageComponent],
exports: [ AppComponent ], exports: [ AppComponent ],

View File

@ -1,7 +1,3 @@
<schema2jsonld [URL]="properties.baseLink"
[logoURL]="properties.baseLink+'/assets/common-assets/logo-small-connect.png'" type="home"
name="OpenAIRE Connect">
</schema2jsonld>
<div> <div>
<div class="image-front-topbar" <div class="image-front-topbar"
uk-scrollspy="{&quot;target&quot;:&quot;[uk-scrollspy-class]&quot;,&quot;cls&quot;:&quot;uk-animation-fade&quot;,&quot;delay&quot;:false}" uk-scrollspy="{&quot;target&quot;:&quot;[uk-scrollspy-class]&quot;,&quot;cls&quot;:&quot;uk-animation-fade&quot;,&quot;delay&quot;:false}"

View File

@ -17,7 +17,6 @@ import {BrowseCommunityModule} from './browseCommunity/browse-community.modul
import {HelperModule} from "../openaireLibrary/utils/helper/helper.module"; import {HelperModule} from "../openaireLibrary/utils/helper/helper.module";
import {GifSliderModule} from "../openaireLibrary/utils/gif-slider/gif-slider.module"; import {GifSliderModule} from "../openaireLibrary/utils/gif-slider/gif-slider.module";
import {OtherPortalsModule} from "../openaireLibrary/sharedComponents/other-portals/other-portals.module"; import {OtherPortalsModule} from "../openaireLibrary/sharedComponents/other-portals/other-portals.module";
import {Schema2jsonldModule} from "../openaireLibrary/sharedComponents/schema2jsonld/schema2jsonld.module";
import {SEOServiceModule} from "../openaireLibrary/sharedComponents/SEO/SEOService.module"; import {SEOServiceModule} from "../openaireLibrary/sharedComponents/SEO/SEOService.module";
@NgModule({ @NgModule({
@ -25,7 +24,7 @@ import {SEOServiceModule} from "../openaireLibrary/sharedComponents/SEO/SEOServi
CommonModule, FormsModule, RouterModule, CommonModule, FormsModule, RouterModule,
ManageModule, ErrorMessagesModule, ManageModule, ErrorMessagesModule,
SearchFormModule, BrowseCommunityModule, GifSliderModule, OtherPortalsModule, SearchFormModule, BrowseCommunityModule, GifSliderModule, OtherPortalsModule,
HelperModule, Schema2jsonldModule, SEOServiceModule HelperModule, SEOServiceModule
], ],
declarations: [ declarations: [
CommunitiesComponent CommunitiesComponent

View File

@ -1,8 +1,3 @@
<schema2jsonld *ngIf="community" [URL]="url"
[logoURL]="community.logoUrl" type="home"
[name]="community.title">
</schema2jsonld>
<div class=""> <div class="">
<div id="stickhere"> <div id="stickhere">
</div> </div>

View File

@ -22,7 +22,6 @@ import {SearchResearchResultsServiceModule} from "../openaireLibrary/services/se
import {SearchResultsModule} from "../openaireLibrary/searchPages/searchUtils/searchResults.module"; import {SearchResultsModule} from "../openaireLibrary/searchPages/searchUtils/searchResults.module";
import {CuratorsModule} from "../curators/curators.module"; import {CuratorsModule} from "../curators/curators.module";
import {AffiliationsModule} from "../affiliations/affiliations.module"; import {AffiliationsModule} from "../affiliations/affiliations.module";
import {Schema2jsonldModule} from "../openaireLibrary/sharedComponents/schema2jsonld/schema2jsonld.module";
import {SEOServiceModule} from "../openaireLibrary/sharedComponents/SEO/SEOService.module"; import {SEOServiceModule} from "../openaireLibrary/sharedComponents/SEO/SEOService.module";
import {MatSelectModule} from "@angular/material"; import {MatSelectModule} from "@angular/material";
import {EntitiesSelectionModule} from "../openaireLibrary/searchPages/searchUtils/entitiesSelection.module"; import {EntitiesSelectionModule} from "../openaireLibrary/searchPages/searchUtils/entitiesSelection.module";
@ -36,7 +35,7 @@ import {ErrorMessagesModule} from "../openaireLibrary/utils/errorMessages.module
SubscribeModule, StatisticsModule, ManageModule, InviteModule, SubscribeModule, StatisticsModule, ManageModule, InviteModule,
SearchZenodoCommunitiesServiceModule, ZenodoCommunitiesServiceModule, SearchFormModule, SearchDataprovidersServiceModule, SearchProjectsServiceModule, SearchZenodoCommunitiesServiceModule, ZenodoCommunitiesServiceModule, SearchFormModule, SearchDataprovidersServiceModule, SearchProjectsServiceModule,
SearchResearchResultsServiceModule, SearchResultsModule, CuratorsModule, AffiliationsModule, SearchResearchResultsServiceModule, SearchResultsModule, CuratorsModule, AffiliationsModule,
Schema2jsonldModule, SEOServiceModule, MatSelectModule, EntitiesSelectionModule, SEOServiceModule, MatSelectModule, EntitiesSelectionModule,
TabsModule, SearchTabModule, ErrorMessagesModule TabsModule, SearchTabModule, ErrorMessagesModule
], ],
declarations: [ declarations: [

View File

@ -1,4 +1,5 @@
<schema2jsonld *ngIf="url" [URL]="url" [name]="pageTitle" type="other"></schema2jsonld> <schema2jsonld *ngIf="url" [URL]="url" [name]="pageTitle" type="other"
description="Contact us to learn more about OpenAIRE Connect Research Gateways"></schema2jsonld>
<ng-template #info> <ng-template #info>
<helper *ngIf="pageContents && pageContents['right'] && pageContents['right'].length > 0" <helper *ngIf="pageContents && pageContents['right'] && pageContents['right'].length > 0"
[texts]="pageContents['right']"></helper> [texts]="pageContents['right']"></helper>

View File

@ -57,7 +57,7 @@ export class ContactComponent implements OnInit {
this.seoService.createLinkForCanonicalURL(this.url); this.seoService.createLinkForCanonicalURL(this.url);
this.updateUrl(this.url); this.updateUrl(this.url);
this.updateTitle(this.pageTitle); this.updateTitle(this.pageTitle);
this.updateDescription("OpenAIRE - Connect, Community Gateway, research community"); this.updateDescription("Contact us to learn more about OpenAIRE Connect Research Gateways");
this.reset(); this.reset();
//this.getDivContents(); //this.getDivContents();
this.getPageContents(); this.getPageContents();

View File

@ -11,7 +11,7 @@ import {ConnectHelper} from "../openaireLibrary/connect/connectHelper";
@Component({ @Component({
selector: 'html-page', selector: 'html-page',
template: ` template: `
<schema2jsonld *ngIf="url" [URL]="url" [name]="pageTitle" type="other"></schema2jsonld> <schema2jsonld *ngIf="url" [URL]="url" [name]="pageTitle" type="other" [description]="description"></schema2jsonld>
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0" [texts]="pageContents['top']"></helper> <helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0" [texts]="pageContents['top']"></helper>
` `
}) })

View File

@ -18,6 +18,6 @@ import {Breadcrumb} from "../../openaireLibrary/utils/breadcrumbs/breadcrumbs.co
}) })
export class FaqsComponent { export class FaqsComponent {
public pageTitle: string = "OpenAIRE - Connect | FAQs"; public pageTitle: string = "OpenAIRE - Connect | FAQs";
public pageDescription: string = "OpenAIRE - Connect, Community Gateway, research community"; public pageDescription: string = "Frequently asked questions about OpenAIRE Connect research gateway";
public breadcrumbs: Breadcrumb[] = [{name: 'home', route: '/'}, {name: 'about', route: '/about'}, {name: 'FAQs'}]; public breadcrumbs: Breadcrumb[] = [{name: 'home', route: '/'}, {name: 'about', route: '/about'}, {name: 'FAQs'}];
} }

View File

@ -1,10 +1,4 @@
import {Component} from '@angular/core'; import {Component} from '@angular/core';
import {ActivatedRoute, Router} from '@angular/router';
import {Meta, Title} from '@angular/platform-browser';
import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
import {HelperService} from "../openaireLibrary/utils/helper/helper.service";
import {SEOService} from "../openaireLibrary/sharedComponents/SEO/SEO.service";
import {Breadcrumb} from "../openaireLibrary/utils/breadcrumbs/breadcrumbs.component"; import {Breadcrumb} from "../openaireLibrary/utils/breadcrumbs/breadcrumbs.component";
@Component({ @Component({
@ -24,6 +18,6 @@ import {Breadcrumb} from "../openaireLibrary/utils/breadcrumbs/breadcrumbs.compo
}) })
export class LearnHowComponent { export class LearnHowComponent {
public pageTitle: string = "OpenAIRE - Connect | Learn How"; public pageTitle: string = "OpenAIRE - Connect | Learn How";
public pageDescription: string = "OpenAIRE - Connect, Community Gateway, research community"; public pageDescription: string = "Learn the process: Build a Gateway to your community's open and linked research outcomes. Customized to your needs.";
public breadcrumbs: Breadcrumb[] = [{name: 'home', route: '/'}, {name: 'about'}]; public breadcrumbs: Breadcrumb[] = [{name: 'home', route: '/'}, {name: 'about'}];
} }

View File

@ -18,6 +18,6 @@ import {Breadcrumb} from "../../openaireLibrary/utils/breadcrumbs/breadcrumbs.co
}) })
export class LearnInDepthComponent { export class LearnInDepthComponent {
public pageTitle: string = "OpenAIRE - Connect | Learn In Depth"; public pageTitle: string = "OpenAIRE - Connect | Learn In Depth";
public pageDescription: string = "OpenAIRE - Connect, Community Gateway, research community"; public pageDescription: string = "Work in 4 collaborative steps to identify your needs, putting in practice our expertise on open science so you get the most out of OpenAIREs operational services.";
public breadcrumbs: Breadcrumb[] = [{name: 'home', route: '/'}, {name: 'about', route: '/about'}, {name: 'learn in-depth'}]; public breadcrumbs: Breadcrumb[] = [{name: 'home', route: '/'}, {name: 'about', route: '/about'}, {name: 'learn in-depth'}];
} }

View File

@ -1,113 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
<url>
<loc><![CDATA[https://demo.openaire.eu]]></loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc><![CDATA[https://demo.openaire.eu/participate/deposit-publications-data]]></loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc><![CDATA[https://demo.openaire.eu/participate/claim]]></loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc><![CDATA[https://demo.openaire.eu/search/find]]></loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc><![CDATA[https://demo.openaire.eu/search/find/publications]]></loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc><![CDATA[https://demo.openaire.eu/search/find/other]]></loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc><![CDATA[https://demo.openaire.eu/search/find/datasets]]></loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc><![CDATA[https://demo.openaire.eu/search/find/projects]]></loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc><![CDATA[https://demo.openaire.eu/search/find/people]]></loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc><![CDATA[https://demo.openaire.eu/search/find/organizations]]></loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc><![CDATA[https://demo.openaire.eu/search/find/dataproviders]]></loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc><![CDATA[https://demo.openaire.eu/search/advanced/publications]]></loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc><![CDATA[https://demo.openaire.eu/search/advanced/other]]></loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc><![CDATA[https://demo.openaire.eu/search/advanced/datasets]]></loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc><![CDATA[https://demo.openaire.eu/search/advanced/projects]]></loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc><![CDATA[https://demo.openaire.eu/search/advanced/people]]></loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc><![CDATA[https://demo.openaire.eu/search/advanced/organizations]]></loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc><![CDATA[https://demo.openaire.eu/search/advanced/dataproviders]]></loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc><![CDATA[https://demo.openaire.eu/search/content-providers]]></loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc><![CDATA[https://demo.openaire.eu/search/entity-registries]]></loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>![CDATA[https://demo.openaire.eu/participate/deposit-publications]</loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>![CDATA[https://demo.openaire.eu/participate/deposit-datasets]</loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
</urlset>

View File

@ -1,3 +1,10 @@
User-Agent: * User-Agent: *
Disallow: /participate/direct-claim
Disallow: /participate/direct-claim?*
Disallow: /participate/claim
Disallow: /myclaims
Disallow: /myclaims?*
Disallow: /claims
Disallow: /claims?*
Sitemap: https://connect.openaire.eu/sitemap.xml Sitemap: /sitemap.xml

View File

@ -1,24 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
<url>
<loc><![CDATA[https://connect.openaire.eu]]></loc>
</url>
<url>
<loc><![CDATA[https://connect.openaire.eu/about/learn-how]]></loc>
</url>
<url>
<loc><![CDATA[https://connect.openaire.eu/about/learn-in-depth]]></loc>
</url>
<url>
<loc><![CDATA[https://connect.openaire.eu/about/faq]]></loc>
</url>
<url>
<loc><![CDATA[https://connect.openaire.eu/search/find/communities]]></loc>
</url>
<url>
<loc><![CDATA[https://connect.openaire.eu]]></loc>
</url>
<url>
<loc><![CDATA[https://connect.openaire.eu]]></loc>
</url>
</urlset>