Skip to content

Commit

Permalink
Merge pull request #28 from arcticicestudio/feature/gh-27-gatsby-init…
Browse files Browse the repository at this point in the history
…ial-configuration

Gatsby initial configuration
  • Loading branch information
arcticicestudio authored Nov 19, 2018
2 parents 16e90c3 + c616116 commit 3cda262
Show file tree
Hide file tree
Showing 8 changed files with 13,808 additions and 3,433 deletions.
81 changes: 81 additions & 0 deletions gatsby-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
/*
* Copyright (C) 2018-present Arctic Ice Studio <[email protected]>
* Copyright (C) 2018-present Sven Greb <[email protected]>
*
* Project: Nord Docs
* Repository: https://github.com/arcticicestudio/nord-docs
* License: MIT
*/

/**
* @file The Gatsby configuration.
* @author Arctic Ice Studio <[email protected]>
* @author Sven Greb <[email protected]>
* @see https://gatsbyjs.org/docs/gatsby-config
* @since 0.1.0
*/

const { metadataNord, metadataNordDocs } = require("./src/data/project");
const { sourceInstanceTypes } = require("./src/config/internal/nodes");
const {
BASE_DIR_CONTENT,
BASE_DIR_ASSETS_IMAGES,
BASE_DIR_CONFIG,
BASE_DIR_PAGES
} = require("./src/config/internal/constants");
const { BASE_PUBLIC_URL } = require("./src/config/routes/constants");

module.exports = {
siteMetadata: {
nord: { ...metadataNord },
...metadataNordDocs
},
plugins: [
"gatsby-plugin-react-helmet",
"gatsby-plugin-catch-links",
"gatsby-plugin-remove-trailing-slashes",
"gatsby-plugin-no-sourcemaps",
"gatsby-transformer-yaml",
{
resolve: "gatsby-plugin-canonical-urls",
options: {
siteUrl: `${BASE_PUBLIC_URL}`
}
},
{
resolve: "gatsby-source-filesystem",
options: {
name: "images",
path: `${__dirname}/${BASE_DIR_ASSETS_IMAGES}`
}
},
{
resolve: "gatsby-source-filesystem",
options: {
name: `${sourceInstanceTypes.blog.id}`,
path: `${__dirname}/${BASE_DIR_CONTENT}/${sourceInstanceTypes.blog.path}/`
}
},
{
resolve: "gatsby-source-filesystem",
options: {
name: "config",
path: `${__dirname}/${BASE_DIR_CONFIG}/`
}
},
{
resolve: "gatsby-source-filesystem",
options: {
name: `${sourceInstanceTypes.docs.id}`,
path: `${__dirname}/${BASE_DIR_CONTENT}/${sourceInstanceTypes.docs.path}/`
}
},
{
resolve: "gatsby-source-filesystem",
options: {
name: "pages",
path: `${__dirname}/${BASE_DIR_PAGES}/`
}
}
]
};
Loading

0 comments on commit 3cda262

Please sign in to comment.