File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,6 +20,27 @@ export default defineConfig({
2020 'perspectives/the-spec-driven-shift/post-1' : 'perspectives/the-spec-driven-shift/your-ai-codebase-is-a-ticking-time-bomb' ,
2121 'perspectives/the-spec-driven-shift/post-2' : 'perspectives/the-spec-driven-shift/stop-calling-it-a-spec-if-its-not-specific' ,
2222 } ,
23+ transformHead ( { pageData } ) {
24+ const head : Array < [ string , Record < string , string > ] > = [ ]
25+ const image = pageData . frontmatter . image
26+ const title = pageData . frontmatter . title || pageData . title
27+ const description = pageData . frontmatter . description || pageData . description
28+
29+ if ( title ) {
30+ head . push ( [ 'meta' , { property : 'og:title' , content : title } ] )
31+ head . push ( [ 'meta' , { name : 'twitter:title' , content : title } ] )
32+ }
33+ if ( description ) {
34+ head . push ( [ 'meta' , { property : 'og:description' , content : description } ] )
35+ head . push ( [ 'meta' , { name : 'twitter:description' , content : description } ] )
36+ }
37+ if ( image ) {
38+ head . push ( [ 'meta' , { property : 'og:image' , content : `${ siteUrl } ${ image } ` } ] )
39+ head . push ( [ 'meta' , { name : 'twitter:image' , content : `${ siteUrl } ${ image } ` } ] )
40+ }
41+
42+ return head
43+ } ,
2344 head : [
2445 // Favicons
2546 [
You can’t perform that action at this time.
0 commit comments