Skip to content

A collection of Handlebars partials that prescribe the look and feel of Answers components

Notifications You must be signed in to change notification settings

yext/answers-hitchhiker-theme

Repository files navigation

Answers Hitchhiker Theme

A Jambo theme for building Answers experiences.

Additonal resources for integrating Answers can be found at https://hitchhikers.yext.com/.

Need help? Ask a question in the Hitchhiker's Community.

Getting Started

Prerequisites

  • Jambo, a static site generator, which can be installed with npm i jambo
  • An Answers experience configured at https://yext.com. This will provide the experienceKey and the apiKey

Creating an Answers site

Inside a new directory, initialize jambo with the theme:

npx jambo init --theme answers-hitchhiker-theme

Add a universal search page:

npx jambo page --name index --template universal-standard

Inside config/global_config.json, delete the "//" before "apiKey" and enter your apiKey. Do the same for the experienceKey inside config/locale_config.json. You can find examples inside test-site/config.

Build the site:

npx jambo build && grunt webpack

Finally, serve the site:

npx serve public

The site should now be available at http://localhost:5000.

Custom Jambo Commands

This theme makes the following commands available when Jambo imports this theme.

Vertical Command

Creates a vertical page of an Answers experience.

Example usage:

npx jambo vertical --name Locations --verticalKey locations --template vertical-standard

See jambo vertical --help for more info.

Card Command

Creates a new, custom card based on an existing card.

Example usage:

npx jambo card --name custom-location --templateCardFolder cards/location-standard

See jambo card --help for more info.

Direct Answer Card

Creates a new, custom direct answer card.

Example usage:

npx jambo directanswercard --name custom-directanswer --templateCardFolder directanswercards/allfields-standard

See jambo directanswercard --help for more info.