File tree Expand file tree Collapse file tree 1 file changed +35
-6
lines changed Expand file tree Collapse file tree 1 file changed +35
-6
lines changed Original file line number Diff line number Diff line change @@ -68,8 +68,7 @@ if (currentSection) {
6868 const group = product .data .product .group .toLowerCase ();
6969
7070 let ogImage = " https://developers.cloudflare.com/cf-twitter-card.png" ;
71- let changelogImage =
72- " https://developers.cloudflare.com/changelog-preview.png" ;
71+
7372 const images: Record <string , string > = {
7473 " cloudflare essentials" :
7574 " https://developers.cloudflare.com/core-services-preview.png" ,
@@ -88,10 +87,6 @@ if (currentSection) {
8887 ogImage = images [group ];
8988 }
9089
91- if (currentSection === " changelog" ) {
92- ogImage = changelogImage ;
93- }
94-
9590 const tags = [
9691 {
9792 tag: " meta" ,
@@ -142,6 +137,40 @@ if (currentSection) {
142137 content: " " ,
143138 });
144139 }
140+
141+ if (currentSection === " changelog" ) {
142+ let changelogImage =
143+ " https://developers.cloudflare.com/changelog-preview.png" ;
144+
145+ const tags = [
146+ {
147+ tag: " meta" ,
148+ attrs: {
149+ name: " image" ,
150+ content: changelogImage ,
151+ },
152+ content: " " ,
153+ },
154+ {
155+ tag: " meta" ,
156+ attrs: {
157+ name: " og:image" ,
158+ content: changelogImage ,
159+ },
160+ content: " " ,
161+ },
162+ {
163+ tag: " meta" ,
164+ attrs: {
165+ name: " twitter:image" ,
166+ content: changelogImage ,
167+ },
168+ content: " " ,
169+ },
170+ ] as const ;
171+
172+ Astro .props .entry .data .head .push (... tags );
173+ }
145174}
146175
147176// Add noindex tag if present in frontmatter
You can’t perform that action at this time.
0 commit comments