-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathgatsby-config.js
98 lines (97 loc) · 2.76 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
/* eslint-disable @typescript-eslint/no-var-requires */
const path = require('path');
const remarkSlug = require('remark-slug');
module.exports = {
siteMetadata: {
title: 'Pal.js Start your NodeJs, Prisma, GraphQL, React project',
description: 'I am your friend in building NodeJs, Prisma, GraphQL, React project',
author: 'Ahmed Elywa',
siteUrl: `https://paljs.com`,
},
flags: {
PRESERVE_FILE_DOWNLOAD_CACHE: true,
PRESERVE_WEBPACK_CACHE: true,
FAST_DEV: true,
},
plugins: [
{
resolve: `gatsby-plugin-layout`,
options: {
component: require.resolve(`./src/Layouts/index.tsx`),
},
},
'gatsby-plugin-robots-txt',
'gatsby-plugin-sitemap',
'gatsby-plugin-styled-components',
'gatsby-plugin-typescript',
'gatsby-plugin-root-import',
{
resolve: 'gatsby-plugin-mdx',
options: {
defaultLayouts: {
default: path.resolve('./src/components/MdxLayout.tsx'),
},
extensions: ['.mdx', '.md'],
remarkPlugins: [remarkSlug],
gatsbyRemarkPlugins: [
{
resolve: 'gatsby-plugin-mdx-code-demo-oah',
options: {
demoComponent: path.resolve('./src/components/Example'),
},
},
{
resolve: 'gatsby-remark-prismjs',
options: {
classPrefix: 'language-',
inlineCodeMarker: {
tsx: 'tsx',
prisma: 'prisma',
},
aliases: {},
languageExtensions: [
{
language: 'prisma',
extend: 'javascript',
definition: {
keyword: /(enum|model|generator|datasource)/,
'class-name': {
pattern: /^(\w+)(\s)(\w+)|(\s)[A-Z](\w+)/gm,
lookbehind: true,
},
},
insertBefore: {
'class-name': {
annotation: {
pattern: /(^|[^.])@+\w+/,
lookbehind: true,
},
constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/,
},
},
},
],
},
},
],
},
},
'gatsby-plugin-react-helmet',
{
resolve: 'gatsby-plugin-manifest',
options: {
name: 'paljs',
short_name: 'Pal',
start_url: '/dashboard',
display: 'minimal-ui',
icon: 'src/images/logo.png', // This path is relative to the root of the site.
},
},
{
resolve: `gatsby-plugin-google-analytics`,
options: {
trackingId: 'UA-171177495-1',
},
},
],
};