vality.dev/gatsby-config.ts
2023-01-27 13:58:48 +06:00

95 lines
2.3 KiB
TypeScript

import type { GatsbyConfig } from "gatsby";
const config: GatsbyConfig = {
siteMetadata: {
title: `Vality`,
siteUrl: `https://vality.dev`,
},
// More easily incorporate content into your pages through automatic TypeScript type generation and better GraphQL IntelliSense.
// If you use VSCode you can also use the GraphQL plugin
// Learn more at: https://gatsby.dev/graphql-typegen
graphqlTypegen: true,
flags: { DEV_SSR: false },
plugins: [
"gatsby-plugin-emotion",
"gatsby-plugin-image",
"gatsby-plugin-sitemap",
{
resolve: "gatsby-plugin-manifest",
options: {
icon: "src/assets/images/icon.png",
},
},
"gatsby-plugin-mdx",
"gatsby-plugin-sharp",
"gatsby-transformer-sharp",
{
resolve: "gatsby-source-filesystem",
options: {
name: "images",
path: "./src/assets/images/",
},
__key: "images",
},
{
resolve: "gatsby-source-filesystem",
options: {
name: "pages",
path: "./src/pages/",
},
__key: "pages",
},
{
resolve: "gatsby-plugin-react-svg",
options: {
rule: {
include: /assets\/svg/,
},
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/locales`,
name: `locale`,
},
},
{
resolve: `gatsby-plugin-react-i18next`,
options: {
localeJsonSourceName: `locale`, // name given to `gatsby-source-filesystem` plugin.
languages: [`en`, `ru`],
defaultLanguage: `en`,
siteUrl: `https://vality.dev`,
// if you are using trailingSlash gatsby config include it here, as well (the default is 'always')
trailingSlash: "always",
i18nextOptions: {
interpolation: {
escapeValue: false, // not needed for react as it escapes by default
},
keySeparator: false,
nsSeparator: false,
},
pages: [
{
matchPath: "/index",
},
{
matchPath: "/404",
},
],
},
},
{
resolve: `gatsby-plugin-alias-imports`,
options: {
alias: {
"~": "src",
},
},
},
],
};
export default config;