lukaskoeller / gridsome-starter-strapi Goto Github PK
View Code? Open in Web Editor NEWStrapi Starter for Gridsome
Strapi Starter for Gridsome
I have solved my issue. Topic to delete.
This is just to document what issues I ran into and how I resolved them.
They may not affect everyone who uses this repo, but it may be something that could be quickly fixed to avoid anyone else having the same problems.
I was unable to build a GraphQL query using the provided statement in the gridsome.server.js file. I looked at the troubleshooting portion in the readme but that didn't solve the problem.
I found the problem was in the options supplied to the source-strapi plugin. I added fieldName: "strapi"
and typeName: "strapi"
and the query started to work.
siteName: "Gridsome-Starter-Strapi",
plugins: [
{
use: "@gridsome/source-strapi",
options: {
apiURL: "http://localhost:1337",
fieldName: "strapi",
typeName: "strapi",
queryLimit: 1000, // Defaults to 100
contentTypes: ["post"],
singleTypes: ["about"],
// Possibility to login with a Strapi user,
// when content types are not publicly available (optional).
loginData: {
identifier: "",
password: "",
},
},
},
{
use: "@gridsome/transformer-remark",
},
],
};
During the build step I kept getting hung up in gridsome.server.js again because of the process of saving the images from Strapi in the src/assets/images folder.
When I cloned the repo there was no assets/images folder in the project and the function was not creating the necessary directories to save the image file in. I manually created the directory structure and started the process again with no issue.
Hi,
I have implemented your function to move all medias from Strapi into Gridsome's asset directory, so that all feature of the g-image
can be used. And that works very well. I have encountered one problem though. If my server is running and I upload a new image in Strapi, then there is no chance that this image will be moved to assets directory. The server must be restarted.
Is there any way to do that while the server is running? I'm looking for some solution, which would work on production as well. Right know it seems that to make it working, the whole g-image
functionality needs to be implemented in some custom component, which would then use responsive image variants that Strapi creates for every image.
Just so you know, the demo site's images are not loading as they try to load from localhost:1337.....
Could the rich text section be converted to HTML instead of with white-space: pre-line to allow for more customisation around paragraphs?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.