Skip to content

Commit 3cda262

Browse files
Merge pull request #28 from arcticicestudio/feature/gh-27-gatsby-initial-configuration
Gatsby initial configuration
2 parents 16e90c3 + c616116 commit 3cda262

File tree

8 files changed

+13808
-3433
lines changed

8 files changed

+13808
-3433
lines changed

gatsby-config.js

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
/*
2+
* Copyright (C) 2018-present Arctic Ice Studio <[email protected]>
3+
* Copyright (C) 2018-present Sven Greb <[email protected]>
4+
*
5+
* Project: Nord Docs
6+
* Repository: https://github.com/arcticicestudio/nord-docs
7+
* License: MIT
8+
*/
9+
10+
/**
11+
* @file The Gatsby configuration.
12+
* @author Arctic Ice Studio <[email protected]>
13+
* @author Sven Greb <[email protected]>
14+
* @see https://gatsbyjs.org/docs/gatsby-config
15+
* @since 0.1.0
16+
*/
17+
18+
const { metadataNord, metadataNordDocs } = require("./src/data/project");
19+
const { sourceInstanceTypes } = require("./src/config/internal/nodes");
20+
const {
21+
BASE_DIR_CONTENT,
22+
BASE_DIR_ASSETS_IMAGES,
23+
BASE_DIR_CONFIG,
24+
BASE_DIR_PAGES
25+
} = require("./src/config/internal/constants");
26+
const { BASE_PUBLIC_URL } = require("./src/config/routes/constants");
27+
28+
module.exports = {
29+
siteMetadata: {
30+
nord: { ...metadataNord },
31+
...metadataNordDocs
32+
},
33+
plugins: [
34+
"gatsby-plugin-react-helmet",
35+
"gatsby-plugin-catch-links",
36+
"gatsby-plugin-remove-trailing-slashes",
37+
"gatsby-plugin-no-sourcemaps",
38+
"gatsby-transformer-yaml",
39+
{
40+
resolve: "gatsby-plugin-canonical-urls",
41+
options: {
42+
siteUrl: `${BASE_PUBLIC_URL}`
43+
}
44+
},
45+
{
46+
resolve: "gatsby-source-filesystem",
47+
options: {
48+
name: "images",
49+
path: `${__dirname}/${BASE_DIR_ASSETS_IMAGES}`
50+
}
51+
},
52+
{
53+
resolve: "gatsby-source-filesystem",
54+
options: {
55+
name: `${sourceInstanceTypes.blog.id}`,
56+
path: `${__dirname}/${BASE_DIR_CONTENT}/${sourceInstanceTypes.blog.path}/`
57+
}
58+
},
59+
{
60+
resolve: "gatsby-source-filesystem",
61+
options: {
62+
name: "config",
63+
path: `${__dirname}/${BASE_DIR_CONFIG}/`
64+
}
65+
},
66+
{
67+
resolve: "gatsby-source-filesystem",
68+
options: {
69+
name: `${sourceInstanceTypes.docs.id}`,
70+
path: `${__dirname}/${BASE_DIR_CONTENT}/${sourceInstanceTypes.docs.path}/`
71+
}
72+
},
73+
{
74+
resolve: "gatsby-source-filesystem",
75+
options: {
76+
name: "pages",
77+
path: `${__dirname}/${BASE_DIR_PAGES}/`
78+
}
79+
}
80+
]
81+
};

0 commit comments

Comments
 (0)