2019-12-19 22:49:31 +01:00
|
|
|
const purgeCSSConfig = require('./purgecss.config');
|
2020-07-16 00:21:19 +02:00
|
|
|
const isUser = process.env.DOCS_CONTEXT === 'user';
|
|
|
|
const sources = isUser
|
2019-12-18 23:54:23 +01:00
|
|
|
? require('./sources-user')
|
|
|
|
: require('./sources-docs');
|
2019-11-14 23:40:23 +01:00
|
|
|
|
2019-11-08 03:40:20 +01:00
|
|
|
module.exports = {
|
|
|
|
siteMetadata: {
|
2019-11-15 04:04:03 +01:00
|
|
|
title: `Silverstripe CMS Documentation`,
|
2020-07-16 00:21:19 +02:00
|
|
|
description: isUser
|
|
|
|
? `Silverstripe CMS user help guide`
|
|
|
|
: `Developer documentation for Silverstripe CMS and framework`,
|
2019-11-14 00:27:55 +01:00
|
|
|
author: `The Silverstripe Community`,
|
|
|
|
siteUrl: `https://doc.silverstripe.org`,
|
2019-12-17 02:04:09 +01:00
|
|
|
context: process.env.DOCS_CONTEXT,
|
2019-11-08 03:40:20 +01:00
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
`gatsby-plugin-react-helmet`,
|
|
|
|
`gatsby-plugin-sass`,
|
2019-11-14 00:00:41 +01:00
|
|
|
`gatsby-plugin-sharp`,
|
2019-11-14 00:27:55 +01:00
|
|
|
`gatsby-plugin-sitemap`,
|
2019-12-16 01:53:53 +01:00
|
|
|
`gatsby-plugin-netlify`,
|
2019-12-18 23:54:23 +01:00
|
|
|
|
|
|
|
...sources,
|
|
|
|
|
2019-11-18 05:51:57 +01:00
|
|
|
{
|
|
|
|
resolve: `gatsby-source-filesystem`,
|
|
|
|
options: {
|
2019-12-18 23:54:23 +01:00
|
|
|
name: `watcher`,
|
|
|
|
path: `${__dirname}/.cache/gatsby-source-git/`
|
2019-11-18 05:51:57 +01:00
|
|
|
}
|
|
|
|
},
|
2019-11-08 03:40:20 +01:00
|
|
|
{
|
|
|
|
resolve: 'gatsby-transformer-remark',
|
|
|
|
options: {
|
2019-11-19 05:11:20 +01:00
|
|
|
pedantic: false,
|
2019-11-08 03:40:20 +01:00
|
|
|
plugins: [
|
2019-11-14 23:40:23 +01:00
|
|
|
{
|
|
|
|
resolve: `gatsby-remark-prismjs`,
|
|
|
|
options: {
|
|
|
|
aliases: {
|
2019-11-18 05:51:57 +01:00
|
|
|
ss: `html`,
|
|
|
|
sh: `bash`,
|
2019-11-14 23:40:23 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2019-11-14 00:00:41 +01:00
|
|
|
{
|
|
|
|
resolve: `gatsby-remark-images`,
|
|
|
|
options: {
|
|
|
|
maxWidth: 850,
|
|
|
|
},
|
2019-11-20 23:40:22 +01:00
|
|
|
},
|
2019-12-19 02:33:08 +01:00
|
|
|
{
|
|
|
|
resolve: `gatsby-remark-copy-linked-files`,
|
|
|
|
options: {
|
|
|
|
ignoreFileExtensions: [`md`],
|
|
|
|
},
|
|
|
|
},
|
2019-11-08 03:40:20 +01:00
|
|
|
]
|
|
|
|
}
|
2019-11-20 23:40:22 +01:00
|
|
|
},
|
2019-11-08 03:40:20 +01:00
|
|
|
`gatsby-plugin-typescript`,
|
|
|
|
{
|
|
|
|
resolve: `gatsby-plugin-styled-components`,
|
|
|
|
options: {
|
|
|
|
// Add any options here
|
|
|
|
},
|
2019-11-08 04:53:25 +01:00
|
|
|
},
|
2019-11-20 23:40:22 +01:00
|
|
|
{
|
2019-11-08 04:53:25 +01:00
|
|
|
resolve: `gatsby-plugin-purgecss`,
|
|
|
|
options: {
|
2019-12-19 22:49:31 +01:00
|
|
|
...purgeCSSConfig,
|
2019-11-14 23:40:23 +01:00
|
|
|
},
|
2019-11-14 04:09:30 +01:00
|
|
|
},
|
2019-12-16 01:53:53 +01:00
|
|
|
`gatsby-plugin-remove-serviceworker`,
|
2019-11-08 03:40:20 +01:00
|
|
|
],
|
|
|
|
}
|