I am planning to use netify with WordPress.
Will be using wp2static plugin on WordPress to generate static copy and then deploy on netlify.
But how can I make comments and search function work with netlfiy?
here’s an example site that’s using netlify + WordPress and has comments section enabled : The Backlinko SEO Blog by Brian Dean
I am newbie so if anyone of you could point me towards right direction, that would mean alot!
I’m also a newbie and also moving my site off of Wordpress. I didn’t know it was even possible to have a comments section until I read your post.
I’m guessing maybe through functions? Form submissions | Netlify Docs
And have it kick off a build…?
I’m going to watch this thread so I can learn too!
There are various JS-based search libraries line FlexSearch, Lunr, etc. that could handle the client-side search functionality. They might/might not be as good as the PHP one, but can get the job done in many cases. You can also choose to use a 3-rd party tool for better indexing like Algolia search.
The comments have a similar problem. Since there’s no database to store and retrieve comments, you have to look for external sources. There are various comment solutions for static websites like Discus, Gitalk, etc. You can also write a custom logic like I had done once:
Basically, it all boils down to: You’d either have to write the functionality yourself, or rely on some third-party tool to handle it for you.
Hi. I`m using GitHub to store copies of the site. Just give Netlify access to the repository of choice, set the publish directory in case you placed all statically generated files in a sub-folder. Since everything is already statically generated, no build steps or anything are necessary.