Has anyone tried deploying a Kirby site to Netlify via github?
I was testing this today with the starter template but what i got was the default netlify 404 page.
The site works fine on my local server.
I’m thinking it has something to do with the .htaccess file being ignored on netlify but im not sure.
If anyone has successfully coupled Kirby and Netlify before, any help is greatly appreciated! Thanks
Well, its worse than that - Netlify is intended for static sites. Its expecting plain old html or sites controlled by a headless CMS hosted elsewhere. There is no PHP or anything as far as i can tell.
I think the most common scenario is to have some kind of “publishing workflow”:
a PHP webserver (e.g. staging.my-website.com) where you put Kirby, setup the panel, add editor accounts, … and let the editors create content over there.
a production webserver (e.g. my-website.com) where you can either have
the same kirby installation as on your staging environment, but with aggressive caching (needs PHP - but no panel). Whenever your editors “publish” from the staging environment, the content is pushed to the production server (git/rsync/sftp/…), and its caches are cleared.
a static site, generated from your kirby installation on the staging environment (afaik there is no SSG plugin for kirby 3 yet?) which is then pushed onto static hosting (shared hosting/netlify/…)? Note that this only works if none of your website is dynamic (or the dynamic parts of it are fetched from serverless functions via other providers/servers).
Be prepared to develop a lot yourself (plugins/code/hooks/build pipelines/…) for these scenario’s, as this is not really Kirby’s “first use case” but it’s definitely possible .
Aha, I didn’t know about that. Thanks for the links, James .
FWIW, I personally feel more for a scenario with “Kirby as backbone + aggressive caching” vs a “pre-generated static site”. But this is obviously completely my preference/opinion. Use whatever you like