必要な設定

pluginsの配置

pluginsフォルダを作成し、その下に自作プラグインを格納

package.json

"dependencies": {
    "@rescala/gatsby-theme-portfolio": "file:plugins/gatsby-theme-portfolio",
...

gatsby-config.ts

plugins: [
    {
      resolve: `gatsby-theme-portfolio`,
      // See the theme's README for all available options
      options: {},
    },
...