Page Generation| Hitchhikers Platform

What You’ll Learn

In this section, you will learn:

  • How different development environments work
  • What happens during a build
  • What happens when you publish
  • Best practices for publishing

Development Environments: Staging and Production

Before we delve into the depths of page generation, it’s important to understand how development environments work. As is standard in web development, with Yext your Custom Development pages come with two environments:

  • Staging
  • Production

custom development environments

As the names imply, Staging is where you “stage your changes” as you’re developing new features or building the site from scratch and Production is “production ready” or as we like to call it, “ready for primetime” (RFPT©). You always want to test your changes in staging before you push to production to make sure you catch any errors before your consumers (or your boss!).

Build and Publish Your Experience

As you become more familiar with web development, building and publishing your site are critical steps in creating your web experience.

In Yext, it’s important to know a couple of things about the Build process:

  • When you commit your code or when you are creating your live preview, you are kicking off a Build via the Yext CI System

  • The build takes the information in your repository, injects additional data points like your business ID and your API key, and makes your site ready for publishing to a public directory by running through a post-processing toolchain.

  • Builds can take anywhere from 30 seconds to several minutes (or more!) depending on the complexity of the toolchain it’s running. A simple site generated off of the Jambo Answers Template should take less than a few minutes.

  • Builds occur independent of your environment. While in the UI you have to navigate to an environment to see your builds, there will be no difference between your list of builds in the Staging environment or the Production environment.

As an Admin, you don’t need to know the dirty details of what’s happening in the build or too much about what the Yext CI is (unless you’re super curious!) – it’s more important to understand that conceptually this build stage happens and when there are errors or issues you will need to address those.

That’s where publishing comes in. When it comes to Publishing your experience, you are choosing which build you want to publish. When you publish the site the Yext Pages system takes the built files and uploads them to our consumer web serving system where they become accessible through the internet by anyone with the link. In the Staging environment, by default we protect the site with a username and password, which you can modify in the settings page for your site.

Publishing a Branch vs. a Specific Commit

To publish your site, you need to choose to publish to a branch or a specific commit. If you publish a branch, this means that we will automatically publish the latest commit on that branch and the publish will kick-off in the background automatically (though at times you may need to do a manual publish). If you publish a specific commit you are publishing a static version of your repository. In order to do this, your commit needs to have a name, otherwise known as a commit tag. You can add this commit tag in 2 ways:

  1. when you commit your changes save commit during

  2. afterwards, by navigating to the Code Editor, select one of the recent commits for the given branch, and provide a name there.

save commit after

Publishing Staging vs. Production

When you Publish your site, here’s what we recommend for each environment:

Staging: Pin your publish to a branch, whether that’s “master” or another branch you create while developing. This will automatically publish your latest commits to that branch, which will eliminate some manual steps.

Production: Pin your publish to a specific (and verified) commit. You’ll need to add a commit tag to the relevant commit to make this possible (which, as you know, you can do while you’re committing your code or later). Never pin production to a branch, that is very dangerous!

How to Publish Your Page

To publish your page (of course after all of your thorough QA), you can click into either the Staging Environment or Production Environment for your site and click on the “New Publish” button. gif of doing a publish

A modal will appear that allows you to select a branch or a commit tag to publish. Once you select what you want to use, click Continue. You will then be redirected to the publish so you can monitor it in real-time.

unit Quiz
+20 points
Daily Quiz Streak Daily Quiz Streak: 0
Quiz Accuracy Streak Quiz Accuracy Streak: 0
    Error Success Question 1 of 2

    How should you pin your publishes?

    Error Success Question 2 of 2

    Where can you find your builds?

    Wahoo - you did it! 🙌

    You've already completed this quiz, so you can't earn more points.You completed this quiz in 1 attempt and earned 0 points! Feel free to review your answers and move on when you're ready.
1st attempt
0 incorrect
Splash Loading