fix component thumbnail for blog articles
This commit is contained in:
1 parent
8976d56495
commit
c0b75c341a
1 file changed
+4
-1
@@ -15,6 +15,7 @@ export interface DiscordButton {
|
|||||||
export class SeoService {
|
export class SeoService {
|
||||||
private readonly rootDomain = 'https://itzminey.dev';
|
private readonly rootDomain = 'https://itzminey.dev';
|
||||||
private readonly defaultImage = 'https://itzminey.dev/assets/ogimg.png';
|
private readonly defaultImage = 'https://itzminey.dev/assets/ogimg.png';
|
||||||
|
private readonly defaultThumb = 'https://itzminey.dev/assets/thumb.png';
|
||||||
private readonly siteColor = '#0095a4';
|
private readonly siteColor = '#0095a4';
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@@ -54,6 +55,8 @@ export class SeoService {
|
|||||||
existingScript.remove();
|
existingScript.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const thumb = meta?.image || this.defaultThumb;
|
||||||
|
|
||||||
const sectionComponent = {
|
const sectionComponent = {
|
||||||
type: 9,
|
type: 9,
|
||||||
components: [
|
components: [
|
||||||
@@ -65,7 +68,7 @@ export class SeoService {
|
|||||||
accessory: {
|
accessory: {
|
||||||
type: 11,
|
type: 11,
|
||||||
media: {
|
media: {
|
||||||
url: 'https://itzminey.dev/assets/thumb.png'
|
url: thumb
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in new issue
Block a user