To increase customization of the Developer Portal, you can add
custom JavaScript to custom themes that you install.
Procedure
- Add your JavaScript file to your theme. For example, in a sub-directory named
js and the file
myfilename.js
.
- Add the JavaScript file to your theme, by editing your
{custom_theme}.libraries.yml file and adding in the JavaScript file.
An example of the JavaScript file:
myfile:
js:
js/myfilename.js: {}
-
Add the following code to your theme's .info.yml file:
libraries:
- {custom_theme}/myfile
Note: You must replace {custom_theme}
with your theme name. Also, both files must
reference myfile
.
- Zip up the directory and upload it to your portal site. For more information, see Installing additional themes.