Tutorial: Creating a custom theme for the Developer Portal
Customize the appearance of your Developer Portal home page, by generating a sub-theme, configuring the overrides.css file, and installing the newly customized theme.
Before you begin
You must have a Developer Portal enabled, and you must have administrator access to complete this tutorial. The tutorial Creating the Portal explains how to enable the portal if you have not already done so.Important: You’re not permitted to include any IBM®
API Connect code within any custom
themes that you create.
About this tutorial
The way to create a custom theme is to create a custom sub-theme of the standard API Connect theme that the Developer Portal uses by default. The sub-theme inherits all of the resources of the parent theme, and you can then override specific resources to configure the required customizations.
This tutorial takes you through the following lessons:
- Creating a sub-theme by using the theme generator.
- Customizing the overrides.css file.
- Installing and enabling your customized theme.
Creating a sub-theme
- Log in to your Developer Portal as an administrator.
- Click Generate sub-theme window is displayed. . The
- Under Generate tab, enter a Sub-theme name, and
select CSS for the Sub-theme type. (If you prefer, you
can select SCSS, but this extension to CSS is for advanced theme developers,
and isn’t covered by this tutorial.)
- Select the Default template to base your
sub-theme
on. You can create a sub-theme based on a color template. However, for this tutorial you use the Default Connect Theme template. - Click Generate.
- Download the generated sub-theme to a location of your choice, and extract all the files from
the .zip file.Note: The generated sub-theme is available to download for 24 hours.
Customizing the overrides.css file
On your computer, navigate to the files that you extracted. Find the overrides.css file in here: <extract_folder>/css/overrides.css. You can now customize the overrides.css file.
Installing and enabling your customized theme
What you did in this tutorial
In this tutorial, you completed the following tasks:
- Created a sub-theme of your Developer Portal site by using the theme generator.
- Configured some customized home page elements in the overrides.css file of your sub-theme.
- Uploaded and installed your customized theme in your Developer Portal site.
- Successfully customized the appearance of your Developer Portal home page.