PHP - create a search on a static site
I have a site which does not have a DB in the back-end but one day could possibly have one. I currently need the capability to search my existing site from the homepage. My first question is it a good idea to search a site consisting of only static pages?
开发者_JS百科I was hoping to somehow leverage google for this so I do not have to write my own algorithm or anything. The site is completely indexed by google so I figured this would suffice for the time being. I would like to have the results from google search rendered back on to my templated page. Again is this possible and is this a good idea?
Any advice would be great. I know that it seems redundant to search a site with now DB but my user base might not be very computer savy and anything that will help them get the information they need is a plus. Thanks for any advice.
The easiest option that comes to mind is to implement the Google Search for your site.
I would suggest you to go for a Google Custom Search:
http://www.google.com/cse/
I wrote about this a while back for Jekyll generated static sites. You could try this
精彩评论