|
| 1 | +var path = require("path"); |
| 2 | + |
| 3 | +module.exports = { |
| 4 | + siteMetadata: { |
| 5 | + pathPrefix: '/', |
| 6 | + keywords: [ |
| 7 | + 'Anit Shrestha Manandhar', |
| 8 | + 'codeanit', |
| 9 | + 'Software Engineering', |
| 10 | + 'Technical Articles', |
| 11 | + 'Programming Blog', |
| 12 | + ], |
| 13 | + title: "Technical Blog by Anit Shrestha Manandhar.", |
| 14 | + titleAlt: 'codeanit.com', |
| 15 | + description: |
| 16 | + "I am not an expert, I code for a living. I have some experience building software systems that solves the problems. Interested in mind, body and technology. Here are few things I learn and share my view about tech.", |
| 17 | + url: 'https://codeanit.com', // Site domain without trailing slash |
| 18 | + siteUrl: 'https://codeanit.com/', // url + pathPrefix |
| 19 | + siteLanguage: 'en', // Language Tag on <html> element |
| 20 | + logo: 'src/static/logo/logo.png', |
| 21 | + // banner: 'src/static/logo/banner.png', |
| 22 | + favicon: 'static/favicon.png', // Manifest favicon generation |
| 23 | + shortName: 'codeanit', // Shortname for manifest, must be shorter than 12 characters |
| 24 | + author: 'codeanit', // Author for schemaORGJSONLD |
| 25 | + themeColor: '#000000', |
| 26 | + backgroundColor: '#ffffff', |
| 27 | + twitter: '@codeanit', // Twitter Username |
| 28 | + twitterDesc: |
| 29 | + 'Tweets by Anit Shrestha Manandhar.', |
| 30 | + }, |
| 31 | + plugins: [ |
| 32 | + 'gatsby-plugin-printer', |
| 33 | + { |
| 34 | + resolve: 'gatsby-plugin-lunr', |
| 35 | + options: { |
| 36 | + languages: [{ name: 'en' }], |
| 37 | + fields: [ |
| 38 | + { name: 'title', store: true, attributes: { boost: 20 } }, |
| 39 | + { name: 'subtitle', store: true, attributes: { boost: 5 } }, |
| 40 | + { name: 'content' }, |
| 41 | + { name: 'slug', store: true }, |
| 42 | + { name: 'date', store: true }, |
| 43 | + { name: 'keywords', store: true }, |
| 44 | + ], |
| 45 | + resolvers: { |
| 46 | + Mdx: { |
| 47 | + title: node => node.frontmatter.title, |
| 48 | + subtitle: node => node.frontmatter.subtitle, |
| 49 | + content: node => node.rawBody, |
| 50 | + date: node => node.frontmatter.date, |
| 51 | + slug: node => `/posts/${node.frontmatter.slug}`, |
| 52 | + keywords: node => node.formatter.keywords, |
| 53 | + }, |
| 54 | + }, |
| 55 | + filename: 'search_index.json', |
| 56 | + }, |
| 57 | + }, |
| 58 | + { |
| 59 | + resolve: `gatsby-source-filesystem`, |
| 60 | + options: { |
| 61 | + name: `posts`, |
| 62 | + path: `${__dirname}/content/`, |
| 63 | + }, |
| 64 | + }, |
| 65 | + { |
| 66 | + resolve: `gatsby-plugin-manifest`, |
| 67 | + options: { |
| 68 | + name: `Technical Blog by Anit Shrestha Manandhar.`, |
| 69 | + short_name: `blog by codeanit`, |
| 70 | + start_url: `/`, |
| 71 | + background_color: `#ffffff`, |
| 72 | + theme_color: `#ffffff`, |
| 73 | + display: `minimal-ui`, |
| 74 | + icon: `static/icon.png`, // This path is relative to the root of the site. |
| 75 | + }, |
| 76 | + }, |
| 77 | + { |
| 78 | + resolve: `gatsby-plugin-google-analytics`, |
| 79 | + options: { |
| 80 | + trackingId: 'GTM-KWW9X8N', |
| 81 | + head: true, |
| 82 | + }, |
| 83 | + }, |
| 84 | + { |
| 85 | + resolve: 'gatsby-plugin-sitemap', |
| 86 | + options: { |
| 87 | + query: ` |
| 88 | + { |
| 89 | + site { |
| 90 | + siteMetadata { |
| 91 | + siteUrl |
| 92 | + } |
| 93 | + } |
| 94 | + allSitePage { |
| 95 | + edges { |
| 96 | + node { |
| 97 | + path |
| 98 | + } |
| 99 | + } |
| 100 | + } |
| 101 | + } |
| 102 | + `, |
| 103 | + serialize: ({ site, allSitePage }) => |
| 104 | + allSitePage.edges.map(edge => { |
| 105 | + return { |
| 106 | + url: `${site.siteMetadata.siteUrl}${ |
| 107 | + edge.node.path === '/' ? '' : edge.node.path |
| 108 | + }/`, |
| 109 | + changefreq: `daily`, |
| 110 | + priority: 0.7, |
| 111 | + }; |
| 112 | + }), |
| 113 | + }, |
| 114 | + }, |
| 115 | + 'gatsby-plugin-offline', |
| 116 | + 'gatsby-plugin-typescript', |
| 117 | + { |
| 118 | + resolve: 'gatsby-plugin-mdx', |
| 119 | + options: { |
| 120 | + extensions: ['.mdx', '.md'], |
| 121 | + defaultLayouts: { |
| 122 | + default: require.resolve('./src/templates/Blog.tsx'), |
| 123 | + posts: require.resolve('./src/templates/Blog.tsx') |
| 124 | + }, |
| 125 | + remarkPlugins: [require('remark-toc')], |
| 126 | + gatsbyRemarkPlugins: [ |
| 127 | + { |
| 128 | + resolve: 'gatsby-remark-images', |
| 129 | + options: { |
| 130 | + maxWidth: 900, |
| 131 | + backgroundColor: 'transparent', |
| 132 | + showCaptions: true, |
| 133 | + }, |
| 134 | + }, |
| 135 | + 'gatsby-remark-copy-linked-files', |
| 136 | + 'gatsby-remark-sectionize', |
| 137 | + { |
| 138 | + resolve: 'gatsby-remark-autolink-headers', |
| 139 | + options: { |
| 140 | + icon: `<svg style="width: 0px; height: 0px;"></svg>`, |
| 141 | + }, |
| 142 | + }, |
| 143 | + ], |
| 144 | + }, |
| 145 | + }, |
| 146 | + 'gatsby-transformer-sharp', |
| 147 | + 'gatsby-plugin-sharp', |
| 148 | + { |
| 149 | + resolve: 'gatsby-plugin-typography', |
| 150 | + options: { |
| 151 | + pathToConfigModule: './src/utils/typography', |
| 152 | + }, |
| 153 | + }, |
| 154 | + { |
| 155 | + resolve: `gatsby-plugin-page-creator`, |
| 156 | + options: { |
| 157 | + path: path.resolve(__dirname, `src/pages`), |
| 158 | + }, |
| 159 | + }, |
| 160 | + 'gatsby-plugin-emotion', |
| 161 | + 'gatsby-plugin-react-helmet', |
| 162 | + 'gatsby-plugin-twitter', |
| 163 | + |
| 164 | + ], |
| 165 | +}; |
0 commit comments