Skip to content

Commit

Permalink
try to update og metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
seiyria committed Jun 19, 2024
1 parent 2086ebc commit 641bf30
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/app/card/card.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { DOCUMENT } from '@angular/common';
import { Meta } from '@angular/platform-browser';
import { NavController } from '@ionic/angular';
import Handlebars from 'handlebars';
import { environment } from '../../environments/environment';
import { WINDOW } from '../_shared/helpers';
import { ErrataService } from '../errata.service';
import { FAQService } from '../faq.service';
Expand Down Expand Up @@ -136,6 +137,13 @@ export class CardPage implements OnInit, OnDestroy {
property: 'og:description',
content: cardData.text,
});
this.pageMeta.updateTag({
property: 'og:url',
content: `${environment.baseAppUrl}/card/${encodeURIComponent(
cardData.id
)}`,
});
this.pageMeta.updateTag({ name: 'description', content: cardData.text });

/*
I might like to do something like one of these, but I want to replace the url without doing a nav.
Expand Down
1 change: 1 addition & 0 deletions src/environments/environment.prod.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export const environment = {
production: true,
baseAppUrl: 'https://cards.ledergames.com',
baseUrl: 'https://ledercards.netlify.app',
};
1 change: 1 addition & 0 deletions src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

export const environment = {
production: false,
baseAppUrl: 'https://cards.ledergames.com',
baseUrl: 'https://ledercards.netlify.app',
};

Expand Down

0 comments on commit 641bf30

Please sign in to comment.