-
Notifications
You must be signed in to change notification settings - Fork 5
/
gatsby-config.js
56 lines (54 loc) · 1.46 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
require('dotenv').config();
const path = require('path');
const { version } = require('./package.json');
const pathPrefix = '/abtnode/';
module.exports = {
pathPrefix,
plugins: [
{
resolve: require.resolve('@arcblock/www'),
},
{
resolve: require.resolve('@arcblock/gatsby-theme-docs'),
options: {
version: `v${version}`,
official: true,
disableI18n: false,
showGetStarted: true,
defaultBanner: pathPrefix + 'og-banner.png',
sourceDirs: [path.resolve(__dirname, 'src')],
siteMetadata: {
title: 'Blocklet Server',
description: 'Blocklet Server Documentation',
logoUrl: '/abtnode/',
sidebarWidth: 360,
},
algoliaSearch: {
enabled: process.env.NODE_ENV === 'production',
appId: process.env.GATSBY_ALGOLIA_APP_ID,
adminKey: process.env.GATSBY_ALGOLIA_ADMIN_KEY,
searchKey: process.env.GATSBY_ALGOLIA_SEARCH_KEY,
indexName: process.env.GATSBY_ALGOLIA_INDEX_NAME,
},
navItems: [],
extraPlugins: [],
},
},
{
resolve: require.resolve('@arcblock/gatsby-i18n-redirect'),
options: {
languages: ['en', 'zh'],
cookieName: 'nf_lang',
pathPrefix,
pathSuffix: '/',
},
},
// Speed up netlify build
{
resolve: 'gatsby-plugin-netlify-cache',
options: {
cachePublic: true,
},
},
],
};