johannschopplich / kirby-headless-starter Goto Github PK
View Code? Open in Web Editor NEW🦭 Headless Kirby starter – KQL, Express-esque middlewares & more
Home Page: https://kirby-headless-starter.jhnn.dev
License: MIT License
🦭 Headless Kirby starter – KQL, Express-esque middlewares & more
Home Page: https://kirby-headless-starter.jhnn.dev
License: MIT License
Hi @johannschopplich,
first of all, thanks for all the hard work on the headless plugin / startpack. I really appreciate that.
I'm relatively new to the Kirby CMS space and am building a first project with it right now. I have massive issues moving everything to the production server. I'm usually working in the JS space, so maybe I'm too used to having a dist folder which I can easily deploy on Vercel etc. but whatever.
The weird thing is, in development everything is running smoothly.
My setup is as following, I have a monorepo and a completely separated CMS which acts as headless backend from which I can fetch data from. The other folder of the repo is a (obviously also separated) frontend application with NextJS. No questions regarding the frontend, as mentioned above, everything works exactly as I want it to in development, however when moving the files from the CMS folder into the webspace via FTP the server can't find the page.
Here are some things that may cause this error:
.htaccess
and index.php
is located. The default starter kit from kirby works fine on the webserver btw.I hope I could help you a bit understand my problem. If there's a quickfix for that you already know what I have to change, I would be insanely happy to hear from you as this is currently blocking further development.
Again, thanks for your great work and have a good evening!
Hi Johann,
thanks a lot for the headless starter. After having started the whole Kirby headless discussion a few days agai, I am still trying to make sense of it.
Lukas told me in the Discord channel:
Yes, absolutely. Content representations are intended to be used without authentication. As you can fully control the data that they output, you can make sure that no sensitive data is leaked.
If you want to request the data from a JS frontend, the data is considered public by definition.
Can the templates in your headless starter used in the same sense? As in, without auth, only exposing the public data that I choose? Or will I expose sensitive information as soon as I turn of the token option?
Would love to set up the templates as you've shown in the README and then consume those via a JS frontend without auth. Is this possible and does this make sense?
Thanks!
Hi Johann,
Thank you so much for this starter.
I explored it without modifying the configuration and when I create any draft (a note or a page), I have the following message: "Automatic conversion of false to array is deprecated". I can't edit or delete it until the status is "published".
Are you aware of this error? How could I fix it?
Thank you.
Elba
Thanks for providing such a nice Kirby headless starter, I’m currently trying it out with NextJS!
I’m using the default php templates to output JSON, which I then fetch (with bearer token authentication) from my frontend. This works great with your Kirby headless setup!
The only thing I’m having trouble with is fetching the site data from the __site__.php
template. When I try to fetch /__site__
I get the error that this page cannot be found.
If I remember correctly, I have successfully fetched the site data before (with your kirby-headless plugin v.1.3 and Kirby 3) by fetching the _site.php
template from /_site
.
Has anything changed with the way that I need to fetch the site data (apart from fetching /__site__
instead of /_site
now)?
I can find a workaround by fetching the site data through another page or using the API differently, so no worries – just wondering if I am missing something simple!
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.