У меня есть блог, построенный в Гэтсби. Я также хотел бы использовать docz
для документирования своих реагирующих компонентов. Тем не менее, я не могу заставить обоих работать в моем приложении. Всякий раз, когда я запускаю $ yarn start
, я просто получаю свою страницу документации, а не свой блог. Как я могу вести свой блог с помощью $ yarn start
и все еще запускать мои документы с помощью другой команды? Спасибо!
// gatsby-config.js
require('dotenv').config();
const colors = require('./src/utils/colors');
const { GRAPHQL_URL } = process.env;
module.exports = {
siteMetadata: {
title: 'blog',
description: "my blog",
author: 'me',
siteUrl: 'https://www.me.com',
},
plugins: [
'gatsby-plugin-typescript',
'gatsby-plugin-tslint',
{
resolve: `gatsby-plugin-tsconfig-paths`,
},
{
resolve: 'gatsby-source-graphql',
options: {
typeName: 'GCMS',
fieldName: 'gcms',
url: GRAPHQL_URL,
},
},
'gatsby-plugin-react-helmet',
'gatsby-plugin-emotion',
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'images',
path: `${__dirname}/src/images`,
},
},
'gatsby-transformer-sharp',
'gatsby-plugin-sharp',
{
resolve: 'gatsby-plugin-manifest',
options: {
name: 'blog',
short_name: 'blog',
start_url: '/',
background_color: '#ffffff',
theme_color: colors.Blue,
display: 'minimal-ui',
icon: 'src/images/icon.png',
},
},
{
resolve: `gatsby-plugin-typography`,
options: {
pathToConfigModule: `src/utils/typography`,
},
},
'gatsby-plugin-sitemap',
'gatsby-theme-docz',
],
};
// doczrc.js
export default {
files: ['**/*.{md,markdown,mdx}'],
dest: '.docz/theme/dist',
typescript: true,
}