@@ -44,6 +44,7 @@ if (currentSection) {
4444 content: " " ,
4545 });
4646 }
47+
4748 if (product .data .product .title ) {
4849 const productName = product .data .product .title ;
4950 Astro .props .entry .data .head .push ({
@@ -63,7 +64,58 @@ if (currentSection) {
6364 content: " " ,
6465 });
6566 }
67+
6668 if (product .data .product .group ) {
69+ const group = product .data .product .group .toLowerCase ();
70+
71+ let ogImage = " https://developers.cloudflare.com/cf-twitter-card.png" ;
72+ const images: Record <string , string > = {
73+ " cloudflare essentials" :
74+ " https://developers.cloudflare.com/core-services-preview.png" ,
75+ " cloudflare one" : " https://developers.cloudflare.com/zt-preview.png" ,
76+ " developer platform" :
77+ " https://developers.cloudflare.com/dev-products-preview.png" ,
78+ " network security" :
79+ " https://developers.cloudflare.com/core-services-preview.png" ,
80+ " application performance" :
81+ " https://developers.cloudflare.com/core-services-preview.png" ,
82+ " application security" :
83+ " https://developers.cloudflare.com/core-services-preview.png" ,
84+ };
85+
86+ if (images [group ]) {
87+ ogImage = images [group ];
88+ }
89+
90+ const tags = [
91+ {
92+ tag: " meta" ,
93+ attrs: {
94+ name: " image" ,
95+ content: ogImage ,
96+ },
97+ content: " " ,
98+ },
99+ {
100+ tag: " meta" ,
101+ attrs: {
102+ name: " og:image" ,
103+ content: ogImage ,
104+ },
105+ content: " " ,
106+ },
107+ {
108+ tag: " meta" ,
109+ attrs: {
110+ name: " twitter:image" ,
111+ content: ogImage ,
112+ },
113+ content: " " ,
114+ },
115+ ] as const ;
116+
117+ Astro .props .entry .data .head .push (... tags );
118+
67119 Astro .props .entry .data .head .push ({
68120 tag: " meta" ,
69121 attrs: {
0 commit comments