-
Notifications
You must be signed in to change notification settings - Fork 0
/
gatsby-config.js
104 lines (97 loc) · 2.75 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
/**
* Configure your Gatsby site with this file.
*
* See: https://www.gatsbyjs.com/docs/gatsby-config/
*/
const config = require("./src/config");
module.exports = {
siteMetadata: {
title: "Anson Heung | Front-end Developer",
description: "A front-end web developer focused on building websites with stunning interfaces and experiences.",
og: "/og.png", // Social media image preview (in `static/` folder, don't add "." at front)
siteUrl: "https://www.ansonheung.me", // No trailing slash allowed
twitterUsername: "@AnsonH_",
},
plugins: [
/* SEO */
`gatsby-plugin-react-helmet`,
`gatsby-plugin-robots-txt`,
`gatsby-plugin-sitemap`,
{
resolve: `gatsby-plugin-manifest`,
options: {
// https://developer.mozilla.org/en-US/docs/Web/Manifest#members
name: `Anson Heung`,
short_name: `Anson Heung`,
start_url: `/`,
background_color: config.themeColor.black,
theme_color: config.themeColor.darkCyan,
display: `minimal-ui`,
icon: `src/images/icon.png`,
},
},
/* Styling */
{
resolve: `gatsby-plugin-styled-components`,
options: {
// Disable better debugging in production to reduce file size
// https://styled-components.com/docs/tooling#better-debugging
displayName: process.env.NODE_ENV === "development" ? true : false,
},
},
{
resolve: `gatsby-plugin-google-fonts`,
options: {
fonts: [`ubuntu:400,500,700`, `ubuntu mono:400,700`],
display: "swap", // Show fallback font before Google Font is fetched
},
},
/* Image Optimization */
`gatsby-plugin-image`,
`gatsby-plugin-sharp`,
`gatsby-transformer-sharp`,
/* Source filesystem */
{
resolve: `gatsby-source-filesystem`,
options: {
name: `images`,
path: `${__dirname}/src/images/`,
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `content`,
path: `${__dirname}/content/`,
},
},
/* Transformer remark (transform markdown) */
{
resolve: `gatsby-transformer-remark`,
options: {
plugins: [
{
// Add attributes to transformed HTML
// https://www.gatsbyjs.com/plugins/gatsby-remark-default-html-attrs/
resolve: `gatsby-remark-default-html-attrs`,
options: {
a: {
// Anchor tags
className: "text-link",
target: "_blank",
rel: "noreferrer",
},
},
},
],
},
},
/* Analytics */
{
resolve: `gatsby-plugin-google-gtag`,
options: {
trackingIds: ["G-BCV9HGHJVL"],
},
},
],
};