GithubHelp home page GithubHelp logo

moxystudio / gatsby-plugin-ipfs Goto Github PK

View Code? Open in Web Editor NEW
114.0 12.0 37.0 643 KB

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

License: MIT License

JavaScript 100.00%
gatsby gatsby-plugin ipfs relative build

gatsby-plugin-ipfs's People

Contributors

dependabot[bot] avatar greenkeeper[bot] avatar m-allanson avatar odin94 avatar parkan avatar satazor avatar threequartersjohn avatar willmhowes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gatsby-plugin-ipfs's Issues

images not rendering until browser page refresh

When public folder is put into ipfs the images don't render on the first page load. Seems that they only appear after a browser/page refresh.

Here's a screencast of the behavior. Not sure how to better describe this behavior. Does this happen to you @satazor? Not sure if this is a local to my ipfs node or not. I haven't yet found a pinner that I can test this on.

https://screencast.com/t/Xhw7MZxsJ . <-- requires flash, I know. I know. Sorry

Not working correctly with gatsby-plugin-sitemap

I'm trying to generate sitemaps using the plugin gatsby-plugin-sitemap, but the generated URLs are like this: https://website.com./page/

Note the trailing dot after the domain. The gatsby-plugin-sitemap is before the gatsby-plugin-ipfs in gatsby-config.js just for information.

Not sure if there is something that can be done from gatsby-plugin-ipfs side.

Broken with gatsby v2

There are breaking API changes in Gatsby v2 which prevent this plugin from working.

Static assets not prefixed

Looks like static images aren't getting prefixed.

Could it be as simple as adding static directory to gatsby-node.js line 74

const relativizeMiscAssetFiles = async () => {
    // Replaces all /__GATSBY_IPFS_PATH_PREFIX__/ strings to standard relative paths
    const paths = await globby(['public/**/*', '!public/**/*.html', '!public/**/*.js']);

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please delete the greenkeeper/initial branch in this repository, and then remove and re-add this repository to the Greenkeeper App’s white list on Github. You'll find this list on your repo or organization’s settings page, under Installed GitHub Apps.

Uncaught Syntax Error when using Gatsby Start Blog + IPFS

So I'm trying to deploy the Gatsby Starter Blog to IPFS. I follow the instructions to set up gatsby-plugin-ipfs, and I get the following error in my console after viewing the website on localhost:

Uncaught (in promise) SyntaxError: Unexpected token _ in JSON at position 1132
    at JSON.parse (<anonymous>)
    at Object.YZX3 (commons-56a4a8d1b87de487b0b8.js:1)
    at u (bootstrap:102)
    at Object.6Gk8 (bio.js:15)
    at u (bootstrap:102)
    at Module.RXBc (index.js:1)
    at u (bootstrap:102)

I've made zero changes to the starter so I'm wondering what's going on. The starter by itself without the plugin does not have this issue.

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please delete the greenkeeper/initial branch in this repository, and then remove and re-add this repository to the Greenkeeper App’s white list on Github. You'll find this list on your repo or organization’s settings page, under Installed GitHub Apps.

Remove prefix in manifest file (manifest.webmanifest)

Currently the manifest file is not getting the prefix replaced. I think it's safe just to remove it since it's already relative. Looking at this line, it looks like if we add a special case for a .webmanifest file that removes it the URLs for the icons should be fine.

Let me know if that makes sense, I can try creating a PR for it if you think that's the right direction.

Dependency '[email protected]' is not in the npm registry

Tried to do npm install --save gatsby-plugin-ipfs and was greeted with this error:

npm WARN tar ENOENT: no such file or directory, open '/home/trout/work/personal/gatsby-starter-markdown/node_modules/.staging/antd-15f42b60/dist/antd-with-locales.js.map'
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/har-validator/-/har-validator-5.1.2.tgz
npm ERR! 404 
npm ERR! 404  '[email protected]' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of 'gatsby-starter-markdown'
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/trout/.npm/_logs/2019-04-11T15_06_50_562Z-debug.log

Support for Gatsby v4

Hey - thanks for creating this plugin!

I just created a new (v4) Gatsby site. When I try to install this plugin I receive this error:

~/code/ef/gatsby-ipfs on  master via ⬢ v14.17.6
➜ npm i --save gatsby-plugin-ipfs
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/gatsby
npm ERR!   gatsby@"^4.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer gatsby@"^2.0.0" from [email protected]
npm ERR! node_modules/gatsby-plugin-ipfs
npm ERR!   gatsby-plugin-ipfs@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

Seems we'll need to upgrade this plugin to work with v4?

Gatsby Build not working after installing this

Hello moxystudio,

I installed this plugin, but then it didn't work, so I uninstalled it, but. now my gatsby build won't work. It keeps failing on the images.

" ERROR

Failed to retrieve metadata from image /Users/maxgrok/Documents/maxgrok/maxgrok.github.io/src/pages/articles/2019-11-10---One-Hundred-And-Eighth-Post copy/buddy-ci(1).png Input file contains unsupported image format

Error: Input file contains unsupported image format"

Any ideas?

I've tried rm -r .cache and cleaning the public folder. I've tried reinstalling gatsby-cli globally after an uninstall. I've tried version 10 of node, v12, v13.6.0...I'm not sure what to do. Could you please advise?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.