import constants from './constants'

export default function (
  title: string,
  description: string,
  imageLink: string
) {
  const imageUrl =
    typeof imageLink === 'string' ? imageLink : constants.socialMediaImageUrl

  return [
    {
      prefix: 'og: http://ogp.me/ns#',
      property: 'og:image',
      content: imageUrl,
    },
    {
      hid: 'description',
      name: 'description',
      content: description,
    },
    {
      name: 'author',
      content: 'Jack Barry',
    },
    // Facebook
    {
      property: 'og:title',
      content: title,
    },
    {
      property: 'og:site_name',
      content: 'DevDad.life',
    },
    // Twitter
    {
      name: 'twitter:card',
      content: 'summary_large_image',
    },
    {
      property: 'twitter:title',
      content: title,
    },
    {
      property: 'twitter:description',
      content: description,
    },
    {
      name: 'twitter:image',
      content: imageUrl,
    },
  ]
}

import constants from './constants'

export default function (
  title: string,
  description: string,
  imageLink: string
) {
  const imageUrl =
    typeof imageLink === 'string' ? imageLink : constants.socialMediaImageUrl

  return [
    {
      hid: 'description',
      name: 'description',
      content: description,
    },
    {
      name: 'author',
      content: 'Jack Barry',
    },
    // Facebook
    {
      property: 'og:title',
      content: title,
    },
    {
      prefix: 'og: http://ogp.me/ns#',
      property: 'og:image',
      content: imageUrl,
    },
    {
      property: 'og:site_name',
      content: 'DevDad.life',
    },
    // Twitter
    {
      name: 'twitter:card',
      content: 'summary_large_image',
    },
    {
      property: 'twitter:title',
      content: title,
    },
    {
      property: 'twitter:description',
      content: description,
    },
    {
      name: 'twitter:image',
      content: imageUrl,
    },
  ]
}

--- 
+++ 
@@ -9,6 +9,11 @@
     typeof imageLink === 'string' ? imageLink : constants.socialMediaImageUrl
 
   return [
+    {
+      prefix: 'og: http://ogp.me/ns#',
+      property: 'og:image',
+      content: imageUrl,
+    },
     {
       hid: 'description',
       name: 'description',
@@ -22,11 +27,6 @@
     {
       property: 'og:title',
       content: title,
-    },
-    {
-      prefix: 'og: http://ogp.me/ns#',
-      property: 'og:image',
-      content: imageUrl,
     },
     {
       property: 'og:site_name',
fix(general): Move image meta tag to top of list

Tries moving the meta tag for image to top of the list of elements to see if it's an order issue
