Giter VIP home page Giter VIP logo

Comments (4)

kwiat1990 avatar kwiat1990 commented on July 18, 2024 1

Yeah it is not connected to Strapi right after you download all the images. It was a restriction on my server, which blocks hotlinking for every image ressource unless it is on the white list. Then it works like earlier 🙂

from gridsome-starter-strapi.

lukaskoeller avatar lukaskoeller commented on July 18, 2024

Is there any way to do that while the server is running?

Hi @kwiat1990! I will soon work on this repo anyway, and will have a look into this then as well.

If you want to update your Gridsome page in production when you make changes in Strapi, then this should probably happen through a Webhook that you configure within the hosting platform (e.g. Netflify). This would make Strapi trigger a rebuild of your site within for example Netlify whenever you made changes in Strapi. You can read more under Strapi Webhooks or take inspiration of the tutorial for Gatsby and then apply the approach for gridsome.

As soon as I will have time to work on this repo, I will also try to provide documentation on how to deploy the site properly

from gridsome-starter-strapi.

kwiat1990 avatar kwiat1990 commented on July 18, 2024

@lukaskoeller I misunderstood the JAM concept at the beginning. It's all clear to me now.

I wonder if you have encountered some problems if connecting to Strapi over https? As soon as I moved from local development to production build the function for fetching images directly from Strapi doesn't work anymore, even though I use https module instead http. I can see that I still connect to Strapi but the downloaded images are somehow corrupted and the url of images doesn't get replaced with Gridsome's image object but are null.

EDIT: well, it turned out to be a problem with hotlinking prevention on my server. If it is enable, then image fetching can't work.

from gridsome-starter-strapi.

lukaskoeller avatar lukaskoeller commented on July 18, 2024

I only can say that the Starter hosted on Netlify is not connected to strapi in any way (no webhook or similar). After the build, all links are relative, included locally (since they were downloaded) and thus do not refer to an external resource (thus no cors or other problems). I simply uploaded the build version of the starter to Netlify.

from gridsome-starter-strapi.

Related Issues (5)

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.