Step 9: Rebuild Your Site

This step walks through how to rebuild a Search frontend built using the theme. The reason you would want to do this is if you have a live site already published and want to retain the domain (and thus Yext Pages site) currently in use.

The main use case for rebuilding your site is when you are upgrading the theme version from a legacy version for two reasons:

  1. As you learned in this guide, the process of upgrading your theme to the latest version includes checking each intermediate version for upgrade implications you may have to incorporate into your repo (see Hitchhikers Theme Changelog reference doc), including potential breaking changes. Thus, when jumping many versions at once, you’ll have a longer upgrade process.
  2. On top of that, legacy theme versions use a different file structure, so upgrading is more involved and manual.

For these reasons, we recommend rebuilding the experience instead of trying to upgrade the Theme version manually. You may also decide to rebuild your site even when you’re not starting on a legacy theme version if you have many updates to make, for example if your current theme version is very old or if you decided on a different vision for the site.

Steps to Rebuild a Site

Here are the steps to rebuild a site. You’ll notice that the sequence of these steps mirror those for a theme upgrade. Review those steps for more guidance.

  1. Navigate to Pages > [[site to rebuild]].
  2. Click View Code Editor.
  3. Hover over the master branch, click the three dots, and click Create new branch.
  4. Enter a descriptive branch name, such as rebuild-theme-1.33 (replace 1.33 with the latest Theme version).
  5. Select to use the Search Jambo Template.
    • This will create a fresh branch using the latest theme template - you’re essentially starting with a new repo. (Typically, when you create a new branch, you do it off of master or another existing branch, which makes a copy of that branch. Here you’re making a copy of the Theme template.)
  6. Then click Create Branch.
  7. You’ll have to re-add each page and card of the Search experience and add any styling or customizations. Check out the Build a Search Experience End-to-End guide for additional resources. However, this saves you the trouble of going through updates for every theme version, which may be complicated.
  8. QA the experience thoroughly using Live Preview and the staging site.
  9. Once everything looks good, merge the branch onto master.
    1. Navigate to Pages > [[site to rebuild]].
    2. Click View Code Editor.
    3. Hover over the branch you have been working on, click the three dots, and click Merge branch.
    4. Select to merge into master.
    5. Then click Merge Branch.
  10. Push the update to the live site.

The Search experience will still live in the same Pages site and domain, so there are no changes needed for the integration or from your client. You may want to let your client know the site will have some cool new features and an updated modern UI (from Theme 1.19 ). Of course, if there are any new features you want to remove, you can follow the instructions from that Theme version.

Feedback