There are a few of things to know about when using the themeconfg.json file.
Sections are important. You need to ensure you have the section headers in your themeconfig file.
If you collapse all branches within the siteconfig.json file you will see there are several sections: comment, title, version...., share, footer, scroll, config, filter.
When you are copying any elements from a section into your themeconfig file, you must ensure you have the appropriate section header.
If changing the "scroll" element, this is a section header, so copy the "scroll" section header and the property you want to change into the themeconfig file.
Note that the comment section is always included in the themeconfig file, but is collapsed in this illustration.
If changing the "toc" element, this is part of the "config" section, so you need to ensure you have the "config" section header, and then copy the "toc" element into the section. The header is only needed once, so you can then copy more "config" elements into the section as needed, such as "header".
Brackets must appear in pairs.
If you are using Notepad++ as your editor, to check all brackets are in pairs click a single bracket to see the opening and closing brackets of the pair highlighted in red. Other editors may do something similar.
In addition, each element needs a following comma (,) after the closing bracket, except the last one.
The "scroll" and "toc" elements are not the last ones in the file so both must be closed with a } and a comma (,).
The "header" element is the last in the file so no comma is required.
Effect of incorrect code
The themeconfig.json file uses the same formatting as the siteconfig.json file. If there is any incorrect code in the themeconfig.json, such as missing/extra commas or missing/extra brackets, the published output will default back to the siteconfig.json file settings. So if something isn't updating in your site, always check the file.
Browser refresh while testing
If testing themeconfg file changes on a published copy before changing the template file, be aware that browser refresh is very important to see the results of your changes. However, some browsers are harder to refresh than others.
- Using <Ctrl>+<Shift>+R usually works.
- But if you are not seeing the expected results you may have to close and reopen the browser completely. This means closing all tabs and all open windows of that browser.