A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/moxystudio/gatsby-plugin-ipfs below:

moxystudio/gatsby-plugin-ipfs: Adds support for deploying Gatsby to IPFS by ensuring that assets are relative

Adds support for deploying Gatsby websites to IPFS by ensuring that assets are relative.

$ npm install --save gatsby-plugin-ipfs

Set prefixPath to __GATSBY_IPFS_PATH_PREFIX__ and include the plugin in your gatsby-config.js file:

module.exports = {
    pathPrefix: '__GATSBY_IPFS_PATH_PREFIX__',
    plugins: [
        'gatsby-plugin-ipfs',
    ],
};

And now, simply build the project with npm run build -- --prefix-paths. Better yet, set it by default in your package.json:

"scripts": {
  "build": "gatsby build --prefix-paths"
},

It turns out the Gatsby doesn't support relative paths. But I didn't gave up and came up with smart and ugly hacks to do so:

MIT License


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4