We are excited to announce our Answers Hitchhiker Theme v1.16!
Updates
Here’s a high-level overview of each feature with links to the feature-specific posts where relevant:
- Internationalized Theme: We’ve added support to internationalization! Stay tuned for a more detailed module around how to use it in the next few weeks!
- Page Speed - CSS and JS Inlining: We now inline the theme’s JS and CSS by default per page speed best practices
- New Card for Financial Professionals: We added a new card to support the financial professionals entity type.
- Header Files: The theme includes the necessary hooks to add a more complex header
- New Matches Helper: This helper aids in transitioning from a single language to a multi-language site
- Bug Fixes
Upgrade Call Outs
There are three major callouts for upgrading to Theme 1.16:
A. If your site was created before October 15th
You will need to update to a newer node version. Theme 1.16 depends on a newer version of Jambo which requires node 12+. The following changes are required and should be committed before upgrading:
1. In ci/build_setup.sh
, remove npm install -g npx
Before
#!/bin/sh
npm install -g npx
npm install
After
#!/bin/sh
npm install
2. In ci/install_deps.sh
, remove npx
after serve
Before
#!/bin/bash
npm install -g serve npx
npm install
After
#!/bin/bash
npm install -g serve
npm install
3. Update config.json
In config.json
, (or [domain].config.json)
, add the following line to the “ci_config”:
"base_image_tag": "node-12.18",
B. Add locale_config.json
Once you have committed the above changes and upgraded your theme, you’ll need to pull the newly added locale_config.json
file from the theme. Follow these steps:
-
Hover over the top-level config folder, click the three dots, and click ‘Add File’. Name this file
locale_config.json
. This will add a blank new file.
-
Navigate to the theme file (
themes/answers-hitchhikers-theme/locale_config.json
). Copy and paste the content to the new blank file you just created.
-
Fill in
<REPLACE ME>
with the experience key. -
In the
global_config.json
file, remove the lines for ‘locale’ and ‘experienceKey’ (this is now covered inlocale_config.json
).
C. If you overrode either html.hbs
or core.hbs
You should refresh both to get the latest versions, and re-incorporate your changes. See the stylesheet change in Bug Fixes and the new matches helper items; both of these impact your html.hbs
and core.hbs
files.