Coder Social home page Coder Social logo

johannschopplich / kirby-headless-starter Goto Github PK

View Code? Open in Web Editor NEW
61.0 2.0 4.0 9.75 MB

🦭 Headless Kirby starter – KQL, Express-esque middlewares & more

Home Page: https://kirby-headless-starter.jhnn.dev

License: MIT License

PHP 93.25% Shell 6.75%
headless-cms kirby-cms kirby-plugin kirby-theme

kirby-headless-starter's People

Contributors

dennisbaum avatar johannschopplich 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

Watchers

 avatar  avatar

kirby-headless-starter's Issues

Deployment issues when moving files to FTP server

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:

  • The "default" starter kit from kirby isn't using the public folder in which your .htaccess and index.php is located. The default starter kit from kirby works fine on the webserver btw.
  • Something on the end of the webserver has to be changed (I don't have access to it as I'm building a project for friends)

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!

Can I securely fetch templates without auth?

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!

PHP8 error ? "Automatic conversion of false to array is deprecated"

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

Unable to fetch site data through __site__.php template

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!

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.