Update canonical link with block hash
This commit is contained in:
@@ -12,6 +12,8 @@ export class SeoService {
|
||||
baseTitle = 'mempool';
|
||||
baseDescription = 'Explore the full Bitcoin ecosystem with The Mempool Open Project™.';
|
||||
|
||||
canonicalLink: HTMLElement = document.getElementById('canonical');
|
||||
|
||||
constructor(
|
||||
private titleService: Title,
|
||||
private metaService: Meta,
|
||||
@@ -65,6 +67,16 @@ export class SeoService {
|
||||
this.metaService.updateTag({ property: 'og:description', content: this.getDescription()});
|
||||
}
|
||||
|
||||
updateCanonical(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.canonicalLink.setAttribute('href', 'https://' + domain + path);
|
||||
}
|
||||
|
||||
getTitle(): string {
|
||||
if (this.network === 'testnet')
|
||||
return this.baseTitle + ' - Bitcoin Testnet';
|
||||
|
||||
Reference in New Issue
Block a user