首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >盖茨比和盖茨比主题-博士

盖茨比和盖茨比主题-博士
EN

Stack Overflow用户
提问于 2020-01-29 18:06:33
回答 1查看 375关注 0票数 1

我在盖茨比有个博客。我还想使用docz来记录我的react组件。然而,我似乎不能让两者都在我的应用程序中工作。每当我运行$ yarn start时,我只会得到我的docz页面,而不是我的博客。如何使用$ yarn start运行我的博客,并仍然使用其他命令运行docz内容?谢谢!

代码语言:javascript
复制
// 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',
  ],
};
代码语言:javascript
复制
// doczrc.js
export default {
  files: ['**/*.{md,markdown,mdx}'],
  dest: '.docz/theme/dist',
  typescript: true,
}
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-01-30 00:08:08

解决方案是,而不是,使用gatsby-theme-docz,只需安装docz独立!我现在使用yarn docz dev运行docz

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/59973094

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档