-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathgatsby-config.js
113 lines (112 loc) · 2.63 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
require("dotenv").config({
path: `.env.${process.env.NODE_ENV}`,
})
module.exports = {
siteMetadata: {
siteUrl: `${process.env.WPC_PUBLIC}/`,
siteName: "WPCampus: Where WordPress meets higher education",
description: "WPCampus is a community of web professionals, educators, and people dedicated to advancing higher education by providing support, resources, and training focused on open source web publishing technologies.",
locale: "en_US",
twitter: "@wpcampusorg",
feeds: {
main: "https://wpcampus.org/feed/",
planning: "https://wpcampus.org/feed/planning/",
}
},
plugins: [
"gatsby-plugin-remove-generator",
"gatsby-plugin-react-helmet",
{
resolve: "gatsby-plugin-react-helmet-canonical-urls",
options: {
siteUrl: process.env.WPC_PUBLIC,
},
},
{
resolve: "gatsby-source-filesystem",
options: {
name: "images",
path: `${__dirname}/src/images`,
},
},
{
resolve: "gatsby-plugin-google-analytics",
options: {
trackingId: "UA-73440483-2",
},
},
{
resolve: "gatsby-plugin-sitemap",
options: {
exclude: [
"/404/",
"/account/",
"/callback/",
"/login/",
"/pages/",
"/search/*",
]
}
},
{
resolve: "gatsby-plugin-robots-txt",
options: {
env: {
host: process.env.WPC_PUBLIC,
sitemap: `${process.env.WPC_PUBLIC}/sitemap.xml`,
development: {
policy: [{ userAgent: "*", disallow: ["/"] }]
},
production: {
policy: [{ userAgent: "*", allow: "/" }]
}
}
}
},
"gatsby-transformer-sharp",
"gatsby-plugin-sharp",
{
resolve: "gatsby-plugin-manifest",
options: {
name: "gatsby-starter-default",
short_name: "starter",
start_url: "/",
background_color: "#ffffff",
theme_color: "#2e3641",
display: "minimal-ui",
icon: "src/svg/wpcampus-favicon.svg",
},
},
{
resolve: "gatsby-plugin-postcss",
options: {
postCssPlugins: [require("autoprefixer")(), require("postcss-nested")],
},
},
{
resolve: "gatsby-source-wordpress",
options: {
baseUrl: process.env.GATSBY_WPC_WORDPRESS,
protocol: "https",
hostingWPCOM: false,
useACF: false,
minimizeDeprecationNotice: true,
includedRoutes: [
"**/posts",
"**/pages",
"**/categories",
"**/podcast",
"**/planning",
//"**/members", // @TODO security concern?
],
auth: {
htaccess_user: process.env.WPC_JWT_USER,
htaccess_pass: process.env.WPC_JWT_PASSWORD,
},
},
},
// this (optional) plugin enables Progressive Web App + Offline functionality
// To learn more, visit: https://gatsby.dev/offline
// `gatsby-plugin-offline`,
],
}