Automattic / jetpack

Security, performance, marketing, and design tools — Jetpack is made by WordPress experts to make WP sites safer and faster, and help you grow your traffic.
https://jetpack.com/
Other
1.58k stars 796 forks source link

Search: Add support for local development mode, staging site #22233

Open gibrown opened 2 years ago

gibrown commented 2 years ago

Impacted plugin

Jetpack

What

Have Search work when in development mode.

How

VIP would like to be able to allow developers to customize and test search while not working on a production site.

I think there are two things we can do here:

  1. Add/document how to override the blog id (just a filter on the options) so that the user can specify the blog_id for a production/staging site and display the results from there. This could even be built into the UI somehow, or we could make a better filter name.
  2. Add a local API to Jetpack that we fall back to when the site is in development mode. This would just return some dummy data in different formats. Ideally showing off the range of content results, but having something to start with is the important part and then we can always iterate on it.
formosattic commented 2 months ago

+1 for users on staging mode, such as on the ones creating a staging site at WordPress.com.

Internal Slack: p1714684779667389/1714582570.847549-slack-C02ME06LF:

In theory, a staging site could point at the content for the production site and use that data to display. Or technically we could point it at say the content on jetpack.com so they could work on styling the data.