gatsby-source-strapi | Gatsby source plugin for building websites using Strapi | REST library

 by   strapi JavaScript Version: v1.0.2 License: MIT

kandi X-RAY | gatsby-source-strapi Summary

kandi X-RAY | gatsby-source-strapi Summary

gatsby-source-strapi is a JavaScript library typically used in Web Services, REST, Gatsby applications. gatsby-source-strapi has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can install using 'npm i @webriq/gatsby-source-strapi' or download it from GitHub, npm.

Source plugin for pulling documents into Gatsby from a Strapi API. ️ This version of gatsby-source-strapi is only compatible with Strapi v4. For v3 use this release.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              gatsby-source-strapi has a low active ecosystem.
              It has 331 star(s) with 180 fork(s). There are 26 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 29 open issues and 147 have been closed. On average issues are closed in 760 days. There are 10 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of gatsby-source-strapi is v1.0.2

            kandi-Quality Quality

              gatsby-source-strapi has 0 bugs and 0 code smells.

            kandi-Security Security

              gatsby-source-strapi has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              gatsby-source-strapi code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              gatsby-source-strapi is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              gatsby-source-strapi releases are available to install and integrate.
              Deployable package is available in npm.
              Installation instructions, examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of gatsby-source-strapi
            Get all kandi verified functions for this library.

            gatsby-source-strapi Key Features

            No Key Features are available at this moment for gatsby-source-strapi.

            gatsby-source-strapi Examples and Code Snippets

            No Code Snippets are available at this moment for gatsby-source-strapi.

            Community Discussions

            QUESTION

            Category of Post created by Strapi cannot be retrieved by GraphQL of Gatsby.js. However, it is displayed in GraphiQL of Gatsby.js
            Asked 2022-Jan-18 at 06:09

            Category of Post created by Strapi cannot be retrieved by GraphQL of Gatsby.js. However, it is displayed in GraphiQL of Gatsby.js. 

            I can call and display all but categories.

            I am calling it as follows.

            {categories.name}、{category.slug} I can't get these.

            gatsby-config.js

            ...

            ANSWER

            Answered 2022-Jan-18 at 06:09

            If you are able to see the categories in GraphiQL and not display them, your issue is in the view and how are you treating the data. In this case, (after the typical editions), categories is an array as posts are so unless you loop through them, you won't be able to display them.

            Do something like:

            Source https://stackoverflow.com/questions/70750632

            QUESTION

            Gatsby.js is not generating the dynamic pages that the gatsby-node.js file's graphql query is properly instructing it to generate
            Asked 2021-Oct-01 at 04:34

            I have run gatsby clean before npm run develop but still it has not made a difference...

            My gatsby-node.js file has been looked at by others who are familiar with the Gatsby framework, and they're not sure what the problem is either...

            Here is my gatsby-node.js file:

            ...

            ANSWER

            Answered 2021-Sep-30 at 07:58

            Try running gatsby clean first, and then try it again…

            Source https://stackoverflow.com/questions/69388322

            QUESTION

            Attempting to query with graphql where id is
            Asked 2021-Jun-22 at 06:09

            I need to get a query using graphql in strapi/gatsby where id is {id}. According to the documentation found here you query all like so:

            ...

            ANSWER

            Answered 2021-Jun-22 at 06:09

            QUESTION

            Gatsby GraphQL download multiple images at once
            Asked 2021-Jun-01 at 05:42

            This query

            ...

            ANSWER

            Answered 2021-Jun-01 at 05:42

            So my issue is that I do not know how a user can download all the images by clicking on a link.

            Given that scenario, I would recommend avoiding the Link component, since doesn't fit your requirements.

            I would do something like:

            Source https://stackoverflow.com/questions/67774387

            QUESTION

            npm install: npm ERR! invalid json response body at https://registry.npmjs.org/axios reason: Unexpected end of JSON input
            Asked 2021-May-10 at 08:25

            I have a gatsby portfolio application and had to do some updates to it. Then cloned it from github and had to install dependencies. When i run npm install i have the error log below:

            ...

            ANSWER

            Answered 2021-May-10 at 08:25

            This is not a problem from your side. It is not a problem of package.json. In the ERR, the URL https://registry.npmjs.org/axios (last line of the error message) gives a JSON response which is flawed. See the below image. The JSON validation fails. They must resolve this.

            Try running

            Source https://stackoverflow.com/questions/67466148

            QUESTION

            Strapi & Gatsby image issue
            Asked 2021-Apr-27 at 07:26

            I have been following these steps: https://github.com/strapi/gatsby-source-strapi Since image >> publicURL also didn't work, I have reinstalled the newest version gatsby-source-strapi, in order to be able to get publicURL. This goes throug a local file though...

            Here is my gatsby-config.js

            ...

            ANSWER

            Answered 2021-Apr-27 at 07:26

            According to:

            The page won't display in dev: Error: Cannot read property 'publicURL' of undefined.

            images is an array so it needs to be accessed as:

            Have you tried?

            Source https://stackoverflow.com/questions/67270962

            QUESTION

            Netlify throwing errors on my Gatsby JS about jQuery
            Asked 2021-Jan-19 at 07:34

            Trying to deploy my Gatsby app on netlify. Basically, I added some jQuery for some specific purposes but when I uploaded it, I got the ff error:

            ...

            ANSWER

            Answered 2021-Jan-19 at 07:34

            As I was saying, it's not Netlify's fault since the project is not building locally. You should ensure always that your project is correctly coded in both environments (build and develop) since they have substantial differences between them. A project that works under gatsby develop doesn't mean that it's perfectly coded, only means that it work under certain conditions. You can check the overview between runtime and build-time in Gatsby's docs, the main difference relies on gatsby build's Gatsby Server-Side Rendering (SSR). Keep in mind that you are using jQuery, which points directly to the real DOM, having a high-performance impact on the site, while React, creates and manipulates a virtual DOM (vDOM) to avoid that kind of high-cost actions. It's odd using both approaches.

            In addition, you are importing everything in the component, which will be used across your project in multiple components/pages. This may lead to multiple script rendering/loading if the component is rerendered.

            Said that, your issue may be caused by:

            • AOS.init();
            • The script importation: since they aren't promises, they will be imported at the same time. If for some reason one of them is loaded first (the lighter) and it's dependant on the other one, it will break your project, since it won't be able to load. You are not loading jQuery, unless it's in scripts.js.

            You have many approaches, from changing the approach and using a React-based one, to try to async the script importation (and loading jQuery before), but all the workarounds will need to be tested with some trials and errors:

            Loading jQuery before:

            Source https://stackoverflow.com/questions/65785462

            QUESTION

            How to specify an URL in .env file of Gatsby app?
            Asked 2020-Nov-17 at 06:16

            Just in case, I'd like to know against Gatsby app, in case its settings differ from other node based apps.

            I want to refactor gatsby-config.js by moving http://localhost:1337 to .env.

            From

            ...

            ANSWER

            Answered 2020-Nov-17 at 06:16

            Create a file in the root of your project named .env.development and .env.production. There, create your variable, just:

            Source https://stackoverflow.com/questions/64859323

            QUESTION

            Strapi returns 404 error when fetching data from Gatsby
            Asked 2020-Apr-07 at 10:55

            I'm using this Gatsby starter : https://www.gatsbyjs.org/starters/Vagr9K/gatsby-material-starter as I was looking for something to introduce myself both to Gatsby and to Material UI.

            My first objective was to change Netlify CMS for Strapi CMS, I've followed these steps:

            1. Removed Netlify plugin, both from gatsby-config.js, package.json and make uninstall.
            2. Added Strapi to the project:
              1. npm install --save gatsby-source-strapi and add the plugin to gatsby-config.js

            Here's how I added the Strapi plugin to gatsby-config.js:

            And here's the error I'm getting:

            I think it might be related to Gatsby not being able to contact the remote Strapi server, any idea on how to solve this?

            ...

            ANSWER

            Answered 2020-Apr-07 at 10:55

            Okey, so this was a dumb mistake that I just couldn't see: after trying different solutions, which didn't work, I realized that Strapi was trying to fetch data from http://167.172.32.171//posts?_limit=1000, so my problem was that I had an extra / in the URL I indicated to the plugin.

            Source https://stackoverflow.com/questions/61077494

            QUESTION

            Fetching data from strapi, with gatsby app deployed to netlify
            Asked 2020-Mar-13 at 14:56

            I am building a web app with Gatsby and are having trouble figuring out how to fetch data from the deployed Strapi-app. Gatsby is deployed to Netlify, Strapi deployed to Heroku. (I have no trouble fetching data when running both projects locally)

            I appreciate all the help and useful advice!

            EDIT: Found one solution to this problem. In gatsby-config.js -> gatsby-source-strapi; set apiURL = "process.env.API_URL || 'http://localhost:1337'", and made a new file called ".env.development" in the root folder and typed in "API_URL='your-heroku-app'"

            I am sure there exist a similar solution to use when it is not in development-mode.

            ...

            ANSWER

            Answered 2020-Mar-13 at 14:56

            We explain how to deploy both Strapi on Heroku and Gatsby on Netlify in this tutorial: https://strapi.io/blog/building-a-static-website-using-gatsby-and-strapi#11deploygatsbytonetlify

            I hope it will provide the answer to your question :)

            Cheers!

            Source https://stackoverflow.com/questions/60633297

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install gatsby-source-strapi

            You can enable and configure this plugin in your gatsby-config.js file.
            To enable content sync in Gatsby cloud you need to create two webhooks in your Strapi project:. At this point each time you create an entry the webhooks will trigger a new build a deploy your new Gatsby site.
            Build webhook
            Preview webhook
            Build variables with the following: STRAPI_API_URL with the url of your deployed Strapi application STRAPI_TOKEN with your build API token
            Preview variables: STRAPI_API_URL with the url of your deployed Strapi application STRAPI_TOKEN with your preview API token

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/strapi/gatsby-source-strapi.git

          • CLI

            gh repo clone strapi/gatsby-source-strapi

          • sshUrl

            git@github.com:strapi/gatsby-source-strapi.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular REST Libraries

            public-apis

            by public-apis

            json-server

            by typicode

            iptv

            by iptv-org

            fastapi

            by tiangolo

            beego

            by beego

            Try Top Libraries by strapi

            strapi

            by strapiJavaScript

            strapi-examples

            by strapiJavaScript

            strapi-docker

            by strapiJavaScript

            awesome-strapi

            by strapiJavaScript

            foodadvisor

            by strapiJavaScript