Skip to content

Overriding the Publisher Portal Theme

There are mainly 2 ways to customize and override the publisher portal theme.

  1. Theming using userThemes.js
  2. Overriding React components

In this section, we will cover the first technique which is the easiest way to change the appearance of Developer portal.

For the second technique, please refer Advanced Customization section.

The default theme of the Publisher portal is built into the portal bundle file. You can find the pre-packed default theme file in the <API-M_HOME>/repository/deployment/server/webapps/publisher/source/src/app/data/defaultTheme.js source directory.

This can be used as a reference to identify the custom extension points that are available in the Publisher theme file.

To override the default theme parameters, you have to update the externalized userThemes.js file in the <API-M_HOME>/repository/deployment/server/webapps/publisher/site/public/conf/userThemes.js file.

Changes done in the userThemes.js file are reflected directly in the Publisher app (You do not need to restart the server or rebuild the source code).

When modifying the theme, you can only provide the custom parameter that you want to override in the default theme, the rest of the theme parameters will be inherited from the built-in default theme configuration.

Content of defaultTheme.js

The following is the Publisher app theme object merging with the React Material Design default theme object described here.