sana137.in

Sana's gatsbyjs-based blog
git clone http://git.hanabi.in/repos/sana137.in.git
Log | Files | Refs | README | LICENSE

gatsby-config.js (3880B)


      1 module.exports = {
      2   siteMetadata: {
      3     author: `Sana`,
      4     description: `Hi, I am Sana!`,
      5     headerImg: `https://images.unsplash.com/photo-1536633125620-8a3245c11ffa?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2822&q=80`,
      6     name: `Sana`,
      7     photo: `https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRQMmVLtfjxqwhKZ7MR9I8SIn9s3LsN7l9z7vuIfjzYt97fN3B7&`,
      8     siteUrl: `https://sana137.in`,
      9     title: `Welcome to my website!`,
     10     homeName: `サナ`,
     11   },
     12   plugins: [
     13     {
     14       resolve: `gatsby-plugin-disqus`,
     15       options: {
     16         shortname: `sana137`,
     17       },
     18     },
     19     `gatsby-transformer-remark`,
     20     {
     21       resolve: `gatsby-transformer-remark`,
     22       options: {
     23         plugins: [
     24           {
     25             resolve: `gatsby-remark-katex`,
     26             options: {
     27               strict: `ignore`,
     28             },
     29           },
     30           {
     31             resolve: `gatsby-remark-prismjs`,
     32             options: {
     33               inlineCodeMarker: 'λ',
     34             },
     35           },
     36         ],
     37       },
     38     },
     39     {
     40       resolve: `gatsby-source-filesystem`,
     41       options: {
     42         name: `pages`,
     43         path: `${__dirname}/blogs`,
     44       },
     45     },
     46     `gatsby-plugin-react-helmet`,
     47     {
     48       resolve: `gatsby-source-filesystem`,
     49       options: {
     50         name: `images`,
     51         path: `${__dirname}/src/images`,
     52       },
     53     },
     54     `gatsby-transformer-sharp`,
     55     `gatsby-plugin-sharp`,
     56     {
     57       resolve: `gatsby-plugin-manifest`,
     58       options: {
     59         name: `sana137.in`,
     60         short_name: `starter`,
     61         start_url: `/`,
     62         background_color: `black`,
     63         theme_color: `black`,
     64         display: `minimal-ui`,
     65         icon: `src/images/sunflower.png`, // This path is relative to the root of the site.
     66       },
     67     },
     68     // rss
     69     {
     70       resolve: `gatsby-plugin-feed`,
     71       options: {
     72         query: `
     73           {
     74             site {
     75               siteMetadata {
     76                 title
     77                 description
     78                 siteUrl
     79                 site_url: siteUrl
     80               }
     81             }
     82           }
     83         `,
     84         feeds: [
     85           {
     86             serialize: ({ query: { site, allMarkdownRemark } }) => {
     87               return allMarkdownRemark.edges.map(edge => {
     88                 return Object.assign({}, edge.node.frontmatter, {
     89                   description: edge.node.frontmatter.excerpt,
     90                   date: edge.node.frontmatter.date,
     91                   url: site.siteMetadata.siteUrl + edge.node.frontmatter.path,
     92                   guid: site.siteMetadata.siteUrl + edge.node.frontmatter.path,
     93                   custom_elements: [{ 'content:encoded': edge.node.html }],
     94                 });
     95               });
     96             },
     97             query: `
     98               {
     99                 allMarkdownRemark(
    100                   sort: { order: DESC, fields: [frontmatter___date] },
    101                 ) {
    102                   edges {
    103                     node {
    104                       html
    105                       frontmatter {
    106                         date
    107                         excerpt
    108                         path
    109                         title
    110                       }
    111                     }
    112                   }
    113                 }
    114               }
    115             `,
    116             output: '/rss.xml',
    117             title: "Your Site's RSS Feed",
    118             // optional configuration to insert feed reference in pages:
    119             // if `string` is used, it will be used to create RegExp and then test if pathname of
    120             // current page satisfied this regular expression;
    121             // if not provided or `undefined`, all pages will have feed reference inserted
    122             match: '^/blog/',
    123           },
    124         ],
    125       },
    126     },
    127     // rss end
    128     // this (optional) plugin enables Progressive Web App + Offline functionality
    129     // To learn more, visit: https://gatsby.dev/offline
    130     // `gatsby-plugin-offline`,
    131   ],
    132 };