Site Config Files (< PagesJS 1.0.0) | Yext Hitchhikers Platform

book
Note

This is documentation for the beta version of PagesJS (<1.0.0), which is no longer actively maintained.

For up-to-date documentation, refer to the Site Configuration reference doc.

Overview

The sites-config directory at the root of a Pages project contains configuration files for your Pages app. At a minimum, the sites-config directory must contain a file named ci.json which specifies configuration for the continuous integration system in the pages pipeline.

The directory can contain the following files:

  • ci.json (required)
  • features.json
  • site-stream.json
  • serving.json
  • redirects.csv
  • sitemap.json
  • auth.json


ci.json

This required configuration configures the continuous integration pipelines with the Yext pages system. For a full explanation check out this doc .


features.json

This is an automatically generated file that specifies templates and stream configuration for your Pages app. This file is generated when running the yext pages generate command. Note: because this is an automatically generated file, you should NOT modify it.

The example below demonstrates a features.json which specifies templates (aka features) and the streams used to power the Pages site.

// features.json
{
  "features": [
    {
      "name": "location",
      "streamId": "my-stream-id-1",
      "templateType": "JS",
      "entityPageSet": {
        "plugin": {}
      }
    }
  ],
  "streams": [
    {
      "$id": "my-stream-id-1",
      "fields": [
        "name"
      ],
      "filter": {
        "entityTypes": [
          "location"
        ]
      },
      "localization": {
        "locales": [
          "en"
        ],
        "primary": false
      }
    }
  ]
}


site-stream.json

Use this file to make data from an entity in your Content globally available to all pages in your site!

Refer to the example below, which streams name and logo from an entity to all documents in your site:

{
  "$id": "site-stream",
  "filter": {
    "entityIds": ["site-entity"] // Site Entity ID
  },
  "source": "knowledgeGraph",
  "fields": ["name", "logo"], // Fields to stream from the entity
  "localization": {
    "locales": ["en"],
    "primary": false
  }
}

For more details on how to set up a site stream, refer to our Global Data reference article.


serving.json

This file is used to configure a reverse proxy. For details on how to set up reverse proxy, check out this doc .


redirects.csv

This file allows you to configure redirects in a CSV file. For a full explanation of redirects and how to structure this file, check out this doc .


sitemap.json

This file sets configuration for your site map. Full details here .


auth.json

This file provides a reference to an authentication policy for your site. The file will take the following form:

// auth.json
{
"policyName" : "example-yext-policy"
}

For full details on setting up an auth policy in the Yext platform, check out the Set up a Yext Auth-Protected Site guide.