How to use a dev or early-access branch of the SDK using Jambo/Theme

To use a dev or early-access branch of the SDK, you’ll need to update two files – script/core.hbs and layouts/html.hbs.

Note: If you are using an early-access branch of the theme, this will automatically point to the corresponding early-access branch of the SDK so you don’t need to do anything! You can find instructions on how to upgrade to the early-access branch of theme here.

Considerations

  • We generally don’t recommend forking the script/core.hbs or layouts/html.hbs files. It will make it harder to upgrade your Theme in the future. Once you are no longer using a dev-branch of the SDK, we recommend deleting these files from your top-level directory and return to using the Theme version.

  • When you do this, you are no longer using the global_config.json for the SDK version. Don’t let that confuse you!

  • We may not have translations available for the SDK dev/early-access branches.

  • You are using a dev / early-access branch at your own risk - we will still be fixing bugs and adding polish up until the official release which generally happens at or around our General Access date.

Instructions on How to Upgrade
The instructions below use the SDK feature-spring-release-21 branch as an example. Please make sure that you’re referencing the correct SDK branch when making these updates.

1. Override script/core.hbs
Use Tools > Jambo Commands > Override Theme to fork the script/core.hbs file.

  1. Near the top of the file, replace
<script src="https://assets.sitescdn.net/answers/v{{global_config.sdkVersion}}/{{#if params.sdkLocaleOverride}}{{#unless (eq params.sdkLocaleOverride 'en')}}{{params.sdkLocaleOverride}}-{{/unless}}{{else if global_config.locale}}{{#unless (eq global_config.locale 'en')}}{{global_config.locale}}-{{/unless}}{{/if}}answerstemplates.compiled.min.js" defer></script>

with

<script src="https://assets.sitescdn.net/answers/dev/feature-early-access-spring-21/answerstemplates.compiled.min.js" defer></script>
  1. On the last line, replace

    <script src="https://assets.sitescdn.net/answers/v{{global_config.sdkVersion}}/{{#if params.sdkLocaleOverride}}{{#unless (eq params.sdkLocaleOverride 'en')}}{{params.sdkLocaleOverride}}-{{/unless}}{{else if global_config.locale}}{{#unless (eq global_config.locale 'en')}}{{global_config.locale}}-{{/unless}}{{/if}}answers.min.js" onload="initAnswers()" defer></script>
    

with

<script src="https://assets.sitescdn.net/answers/dev/feature-early-access-spring-21/answers.min.js" onload="initAnswers()" defer></script>

2. Override layouts/html.hbs
Use Tools > Jambo Commands > Override Theme to fork the layouts/html.hbs file.

  1. Replace
<link rel="stylesheet" type="text/css" href="[https://assets.sitescdn.net/answers/v{{global_config.sdkVersion}}/answers.css](https://assets.sitescdn.net/answers/v%7B%7Bglobal_config.sdkVersion%7D%7D/answers.css)">

with

<link rel="stylesheet" type="text/css" href="https://assets.sitescdn.net/answers/dev/feature-early-access-spring-21/answers.css">