Merge pull request #775 from mempool/wiz/fix-canonical-name-for-three-sites

Set canonical URLs for new 3 site structure
This commit is contained in:
softsimon 2021-09-17 14:14:59 +04:00 committed by GitHub
commit 51e09ff64f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,7 +39,13 @@ export class AppComponent implements OnInit {
ngOnInit() {
this.router.events.subscribe((val) => {
if (val instanceof NavigationEnd) {
this.link.setAttribute('href', 'https://mempool.space' + (this.location.path() === '/' ? '' : this.location.path()));
let domain = 'mempool.space';
if (this.stateService.env.BASE_MODULE === 'liquid') {
domain = 'liquid.network';
} else if (this.stateService.env.BASE_MODULE === 'bisq') {
domain = 'bisq.markets';
}
this.link.setAttribute('href', 'https://' + domain + this.location.path());
}
});
}