Build environment variables
At the time your site is built, a number of special environment variables are exposed. You can access these environment variables with your build engine to customize your build (for instance, to add some special text to your site to show which branch has been built).
Build Errors
The following is a non-exhausitve list of commmon issues we see partners run into:
Builds and Previews
Site previews
Bundler on Pages
Pages uses Bundler to manage your Pages site's dependencies. By default, Pages runs Bundler version 1.
Caching Build Dependencies
Each time your website is being built, it needs access to many node or Ruby libraries. By default, we cache these libraries between each run to reduce total build time. Users can disable this feature if it creates any issues with their build.
Custom Headers
This feature is currently experimental, make sure you know what you are doing!
Customizing Your Site
Customizing your site
External Tools and Resources
An outline of external tools and resources customer could leverage outside of the Cloud.gov Pages platform to improve site accessibility, user experience, and security posture.
Forms on Pages sites
Do you want to use a digital form to ask questions of the people visiting your Pages website? Do you want them to fill out a form with their contact info or feedback? This page provides an overview of existing digital form tools and requirements so you can determine which best apply to your situation and get started.
How Builds Work
Pages is a continuous deployment-like build environment for sites. It works by setting a webhook on your site's GitHub repository and generates your site on each push event to that repository, then uploads your site files to S3. Changes made to the site's content and files in its repository through the GitHub web editor or otherwise launch rebuild tasks of the site in a build environment container.
Large File Handling
There are a few guidelines and restrictions to be aware of when dealing with large files, or a large number of files.
Migration Guide
Welcome to your migrating journey onto Pages! This process may be difficult. We generally cannot provide support for migration work beyond general guidance under a standard Pages agreement, but if you are in a situation where you need some guidance, you can contact us to learn more about our additional support packages.
Monorepos on Pages
Monorepos on Pages follow the same rules as any other Pages site; as long as Pages knows what command to run to build the site AND the contents are available in the _site folder in the project root, Pages will be happy.
Node on Pages
Pages supports using node and npm to build your entire site OR to build parts of your site before the build engine starts its work. This is helpful for doing things like compiling a site's assets, or employing a build tool such as Fractal. To use node exclusively, be sure to set your site engine to ‘node.js’ in your site settings. If you want to use node alongside a different language, such as Jekyll or Hugo, do NOT change the site engine, Pages will detect the presence of a package.json file and will run the federalist or pages npm script.
Pages.json
Pages-specific configuration can be done in a federalist.json file in the root of your project. Currently, we only support the following keys:
Renaming a site's repository
Renaming your Pages site repository
RVM on Pages
Pages uses RVM to select which ruby version to use to build a Pages site.
Search on Pages Sites
It's easy to add search functionality to a site.
Supported Site Engines
Current Support