Set canonical URLs for new 3 site structure

This commit is contained in:
wiz 2021-09-10 16:56:00 +09:00
parent 2e122a9be1
commit e1f4de0de3
No known key found for this signature in database
GPG key ID: A394E332255A6173

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());
}
});
}