forked from juliencrn/usehooks-ts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgatsby-config.ts
118 lines (113 loc) · 2.99 KB
/
gatsby-config.ts
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
114
115
116
117
118
import dotenv from 'dotenv'
import type { GatsbyConfig } from 'gatsby'
import path from 'path'
// import * as algolia from './src/libs/algolia'
// import * as feed from './src/libs/feedSerializer'
dotenv.config({ path: `.env.${process.env.NODE_ENV}` })
const siteMetadata = {
title: `usehooks-ts`,
description: `Welcome to the documentation of usehooks-ts, a React hooks library, ready to use, written in typescript.`,
siteUrl: `https://usehooks-ts.com`,
author: `juliencrn`, // Github username
}
const config: GatsbyConfig = {
siteMetadata,
plugins: [
`gatsby-plugin-typescript`,
`gatsby-plugin-catch-links`,
`gatsby-plugin-material-ui`,
`gatsby-plugin-sitemap`,
{
resolve: 'gatsby-plugin-root-import',
options: {
'~': path.join(__dirname, 'src'),
},
},
{
resolve: `gatsby-plugin-mdx`,
options: {
extensions: [`.md`, `.mdx`],
gatsbyRemarkPlugins: [
{
resolve: 'remark-codesandbox/gatsby',
options: {
mode: 'button',
},
},
],
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/generated/posts`,
name: `posts`,
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/generated/hooks`,
name: `hooks`,
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/generated/demos`,
name: `demos`,
},
},
// {
// resolve: `gatsby-plugin-algolia`,
// options: {
// appId: process.env.GATSBY_ALGOLIA_APP_ID,
// apiKey: process.env.GATSBY_ALGOLIA_ADMIN_KEY,
// queries: algolia.queries,
// },
// },
// {
// resolve: `gatsby-plugin-feed`,
// options: {
// feeds: [
// {
// query: `${feed.query}`,
// output: '/rss.xml',
// title: `RSS Feed - ${siteMetadata.title}`,
// description: `${siteMetadata.description}`,
// serialize: ({ query }: feed.SerializeProps) =>
// feed.serializer({ query, siteMetadata }),
// },
// ],
// },
// },
{
resolve: `gatsby-plugin-google-analytics`,
options: {
trackingId: `UA-132477935-3`,
head: false, // Puts script in the head instead of the body
anonymize: true,
},
},
{
resolve: 'gatsby-plugin-robots-txt',
options: {
host: siteMetadata.siteUrl,
policy: [{ userAgent: '*', allow: '/' }],
},
},
{
resolve: `gatsby-plugin-manifest`,
options: {
name: `gatsby-starter-default`,
short_name: `starter`,
start_url: `/`,
background_color: `#007ACC`,
theme_color: `#007ACC`,
display: `minimal-ui`,
icon: `src/images/typescript.png`, // This path is relative to the root of the site.
},
},
],
}
export default config