-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgatsby-config.js
81 lines (80 loc) · 2.46 KB
/
gatsby-config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
module.exports = {
siteMetadata: {
title: `Wenhuang Zeng`,
description: `Wenhuang Zeng's personal website built with GatsbyJS and Semantic UI React.`,
keywords: `Wenhuang Zeng, Brown University, personal website, Facebook intern, Johnson & John intern, Hack@Brown, student`,
author: `@gatsbyjs`,
url:`https://www.whzeng.com`,
},
plugins: [
`gatsby-plugin-react-helmet`,
{
resolve: `gatsby-plugin-sitemap`,
options: {
// Exclude specific pages or groups of pages using glob parameters
// See: https://github.com/isaacs/minimatch
// The example below will exclude the single `path/to/page` and all routes beginning with `category`
exclude: [`/projects`],
query: `
{
site {
siteMetadata {
url
}
}
allSitePage {
nodes {
path
}
}
}`,
resolveSiteUrl: ({site}) => {
//Alternatively, you may also pass in an environment variable (or any location) at the beginning of your `gatsby-config.js`.
return site.siteMetadata.url
},
serialize: ({ site, allSitePage }) =>
allSitePage.nodes.map(node => {
return {
url: `${site.siteMetadata.siteUrl}${node.path}`,
changefreq: `daily`,
priority: 0.7,
}
})
}
},
{
resolve: `gatsby-plugin-robots-txt`,
options: {
host: 'https://www.whzeng.com',
sitemap: 'https://www.whzeng.com/sitemap.xml',
policy: [{ userAgent: '*', allow: '/', disallow: '/projects' }]
}
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `images`,
path: `${__dirname}/src/images`,
},
},
`gatsby-transformer-sharp`,
`gatsby-plugin-sharp`,
{
resolve: `gatsby-plugin-manifest`,
options: {
name: `gatsby-starter-default`,
short_name: `starter`,
start_url: `/`,
background_color: `#663399`,
theme_color: `#663399`,
display: `minimal-ui`,
icon: `static/favicon.ico`, // This path is relative to the root of the site.
},
},
`gatsby-plugin-sass`,
`gatsby-plugin-less`,
// this (optional) plugin enables Progressive Web App + Offline functionality
// To learn more, visit: https://gatsby.dev/offline
// `gatsby-plugin-offline`,
],
}