Commit 382066b7 authored by Mark Harding's avatar Mark Harding

(chore): use full title for og:title

parent 7863956e
No related merge requests found
Pipeline #119525812 running with stages
......@@ -14,6 +14,7 @@ export class MetaService {
private counter: number;
private sep = ' | ';
private title: string = '';
private ogTitle: string = '';
constructor(
private titleService: Title,
......@@ -34,6 +35,9 @@ export class MetaService {
value = this.stripHtml(value);
// Full title for og:title
this.ogTitle = value || defaultTitle;
if (value.length > 60) {
value = value.substr(0, 57) + '...';
}
......@@ -186,7 +190,7 @@ export class MetaService {
}
this.metaService.updateTag({
name: 'og:title',
content: this.title,
content: this.ogTitle,
});
}
......
Please register or to comment