I have installed Kirby as a CMS plugin to an existing static site.
I put my installation in a sub folder.
I am now wondering whether I can pull in latest articles from that sub folder into the root pages of my site?
I have installed Kirby as a CMS plugin to an existing static site.
I put my installation in a sub folder.
I am now wondering whether I can pull in latest articles from that sub folder into the root pages of my site?
First option that comes to mind is using a route that returns the latest articles as JSON, then fetch those articles via JS in your static pages.
Edit: as an alternative to the route, you could also use acontent representation that returns the last x articles
Thank you for both your answers!
I am currently trying the first option with JSON. Iām trying to fetch the data but am getting the following error:
error: SyntaxError: Unexpected token < in JSON at position 1
Could you please post your code?
Thanks for the help guys!