module.exports = {
  siteMetadata: {
    siteUrl: "https://jbhannah.net",
    title: "Jesse B. Hannah",
    description: "jbhannah's personal website and blog",
    twitterCreator: "@jbhannah",
    name: {
      first: "Jesse",
      mi: "B",
      last: "Hannah",
    },
    username: "jbhannah",
    gender: "female",
    pronouns: ["she", "her"],
    socialLinks: [
      {
        service: "GitHub",
        link: "https://github.com/jbhannah",
        name: "jbhannah",
      },
      {
        service: "Keybase",
        link: "https://keybase.io/jbhannah",
        name: "jbhannah",
      },
      {
        service: "LinkedIn",
        link: "https://www.linkedin.com/in/jbhannah",
        name: "jbhannah",
      },
      {
        service: "Twitter",
        link: "https://twitter.com/jbhannah",
        name: "@jbhannah",
      },
    ],
  },
  plugins: [
    {
      resolve: "gatsby-plugin-typescript",
      options: {
        isTSX: true,
        allExtensions: true,
      },
    },
    "gatsby-plugin-emotion",
    {
      resolve: "gatsby-plugin-html-attributes",
      options: {
        lang: "en",
      },
    },
    "gatsby-plugin-react-helmet",
    {
      resolve: "gatsby-plugin-gtag",
      options: {
        trackingId: "UA-75018467-1",
      },
    },
    {
      resolve: "gatsby-source-filesystem",
      options: {
        name: "contents",
        path: `${__dirname}/contents`,
      },
    },
    {
      resolve: "gatsby-source-filesystem",
      options: {
        name: "assets",
        path: `${__dirname}/src/assets`,
      },
    },
    "gatsby-plugin-image",
    "gatsby-plugin-sharp",
    "gatsby-transformer-sharp",
    {
      resolve: "gatsby-transformer-remark",
      options: {
        plugins: [
          "gatsby-jbh-remark-first-header-title",
          "gatsby-jbh-remark-frontmatter",
          "gatsby-jbh-remark-paginator",
          "gatsby-jbh-remark-slug",
          "gatsby-jbh-remark-source",
          "gatsby-remark-autolink-headers",
          "gatsby-remark-numbered-footnotes",
          "gatsby-remark-smartypants",
          {
            resolve: "gatsby-remark-prismjs",
            options: {
              inlineCodeMarker: "›",
              languageExtensions: [
                {
                  extend: "ruby",
                  definition: {
                    operator:
                      /::|\.\.\.?|->|[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,
                  },
                },
              ],
              prompt: {
                user: "jbhannah",
                global: true,
              },
            },
          },
          {
            resolve: "@raae/gatsby-remark-oembed",
            options: {
              providers: { exclude: ["Flickr", "Instagram", "Reddit"] },
            },
          },
        ],
      },
    },
    "gatsby-plugin-react-svg",
    {
      resolve: "gatsby-jbh-source-filesystem-parent",
      options: {
        fields: [
          "name",
          "relativeDirectory",
          "relativePath",
          "sourceInstanceName",
        ],
      },
    },
    {
      resolve: "gatsby-plugin-sitemap",
      options: {
        serialize: ({
          site: {
            siteMetadata: { siteUrl },
          },
          allSitePage: { edges },
        }) =>
          edges.map(({ node: { path } }) => {
            const root = path === "/"

            return {
              url: siteUrl + path,
              changefreq: root ? "weekly" : "never",
              priority: root ? 1.0 : 0.7,
            }
          }),
      },
    },
    {
      resolve: "gatsby-plugin-typography",
      options: {
        omitGoogleFont: true,
        pathToConfigModule: "src/utils/typography.ts",
      },
    },
    "gatsby-plugin-less",
    "gatsby-redirect-from",
    "gatsby-plugin-meta-redirect",
  ],
}

@@ -1,8 +1,46 @@
+const indexExpr = /%5E%5C/(page%5C/%5Cd+)?$/%0A%0A
 module.e
@@ -3222,211 +3222,87 @@
 : (%7B
-%0A          site: %7B%0A            siteMetadata: %7B siteUrl %7D,%0A          %7D,%0A          allSitePage: %7B edges %7D,%0A        %7D) =%3E%0A          edges.map((%7B node: %7B path %7D %7D) =%3E %7B%0A            const root = path === %22/%22%0A
+ path %7D) =%3E %7B%0A          const index = path.match(indexExpr)%0A%0A          return %7B
 %0A   
@@ -3306,35 +3306,35 @@
             
-return %7B%0A  
+url: path,%0A
             
@@ -3337,31 +3337,37 @@
     
-url: siteUrl + path,%0A  
+priority: index ? 1.0 : 0.7,%0A
     
@@ -3386,20 +3386,21 @@
 gefreq: 
-root
+index
  ? %22week
@@ -3418,52 +3418,8 @@
 r%22,%0A
-              priority: root ? 1.0 : 0.7,%0A  
     
@@ -3438,12 +3438,9 @@
     
-  %7D)
+%7D
 ,%0A  

Fix sitemap serializer