Is it Possible to Pair a Few Dynamic (PHP) Pages with Jekyll Generated Site?


#1

Greetings:

I am considering using Jekyll for a project. However, I am not sure it will work for my scenario. While the vast majority of the website is well-suited to static HTML, I do have a few forms that are sent through email (using PHP). My question is, is there anyway to use a Jekyll generated site in harmony with PHP scripts? I have my owner server running PHP so that is not the issue, the question if this can be used with Jekyll generated sites, particularly in regards to routing/navigation?

Thanks!


#2

I have the exact same question. I’m guessing that the lack of response is an indication that most people do not do this at all which is surprising to me. I’m looking for a static + dynamic solution and I’m getting the vibe that there’s no obvious open source solution. It’s not even clear to me that php server includes work well.

The reason I need more than JSON is that I would like users to vote/comment on some items in an iterative fashion…


#3

I’m not a php person, so I can’t answer much - but isn’t php mostly server side? jekyll just spits out whatever you put in - I believe it can output a php extension, so theoretically I think you could do something.


#4

Like @rdyar I don’t have any PHP experience, but there are a number of options to add dynamic bits to a static site if you’re willing to write a little javascript:

Netlify Add-ons
@KellyMarchewa you mentioned forms - check out Netlify’s Forms add-on. Routing would be handled by Javascript on the client.

Hosted microservices
Look for a hosted solution for the specific function you’re looking for. @bafonso you mentioned commenting - check out Talkyard.io, StaticMan, Disqus, and Discourse’s embedded comments feature.

Other examples are search (Algolia) and chat (Pusher).

BaaS providers
I’m currently exploring MongoDB Stitch, but Firebase is fairly popular amongst the static crowd.

Serverless / Cloud Functions
Just call your AWS Lambda or Google Cloud Function from the client.

Personally, I tend to use third party hosted microservices to test demand for a specific feature, then move towards a more flexible solution once I’ve validated demand.

Hope that helps :raised_hands: