1
0

gatsby-config.js 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. const path = require('path');
  2. module.exports = {
  3. pathPrefix: '/',
  4. assetPrefix: (process.env['CDN_OUTER_CN'] || process.env['CDN_INNER_CN']) ? `https://${(process.env['CDN_OUTER_CN'] || process.env['CDN_INNER_CN'])}/${process.env['CDN_PATH_PREFIX']}`: "",
  5. siteMetadata: {
  6. title: 'Gatsby Default Starter',
  7. description: 'Create a consistent, good-looking, easy-to-use, and efficient user experience with a user-centric, content-first, and human-friendly design system',
  8. author: 'Semi Design Team',
  9. },
  10. plugins: [
  11. 'gatsby-plugin-svgr',
  12. 'gatsby-plugin-react-helmet',
  13. {
  14. resolve: 'gatsby-source-filesystem',
  15. options: {
  16. name: 'images',
  17. path: `${__dirname}/src/images`,
  18. },
  19. },
  20. {
  21. resolve: 'gatsby-source-filesystem',
  22. options: {
  23. name: 'content',
  24. path: `${__dirname}/content`,
  25. },
  26. },
  27. {
  28. resolve: 'gatsby-plugin-typescript',
  29. options: {
  30. isTSX: true, // defaults to false
  31. jsxPragma: 'jsx', // defaults to "React"
  32. allExtensions: true, // defaults to false
  33. },
  34. },
  35. {
  36. resolve: 'gatsby-plugin-mdx',
  37. options: {
  38. extensions: ['.mdx', '.md'],
  39. gatsbyRemarkPlugins: [
  40. // {
  41. // resolve: require.resolve('./plugins/gatsby-remark-unwrap'),
  42. // },
  43. {
  44. resolve: require.resolve('./plugins/gatsby-remark-wrap-in-section'),
  45. },
  46. ],
  47. },
  48. },
  49. {
  50. resolve: 'gatsby-plugin-i18n',
  51. options: {
  52. langKeyDefault: 'en',
  53. useLangKeyLayout: false,
  54. },
  55. },
  56. 'gatsby-plugin-remove-serviceworker',
  57. 'gatsby-source-semi-icons'
  58. ],
  59. };