造型在WSO2 API Manager中不工作的徽标和标头4.1.0

发布于 2025-02-01 21:28:09 字数 1860 浏览 5 评论 0原文

我正在尝试通过以下方式自定义Dev-Portal徽标 wso2 doc wso2 apim 4.1.0中。产品下载为zip,并在Windows中提取相同的产品。

根据doc中给出的说明,defaulttheme.js位于&lt; api-m_home&gt; /repository/deployment/server/server/jaggeryapps/devportal/devportal/site/site/site/public/public/public/theme/defaulttheme.js < /code>

但在同一路径内,无法找到defaultTheme.js

< img src =“ https://i.sstatic.net/nwvi4.png” alt =“在此处输入图像说明”>

我在如下所述的其他一些路径中找到了相同的文件。

我开始编辑defaultTheme.js文件配置如下和粘贴的自定义logo映像。

“徽标”

进行了更改后,我启动了服务器,该更改未反映,我可以看到以下相同的默认WSO2 Devportal徽标。

custic-logo:

”

为什么不反映?

I am trying to customize dev-portal logo by follows WSO2 Doc in WSO2 APIM 4.1.0. Product Downloaded as Zip and extracted the same in windows.

As per the instructions given in doc, defaultTheme.js resides inside <API-M_HOME>/repository/deployment/server/jaggeryapps/devportal/site/public/theme/defaultTheme.js

But inside the same path, unable to find out defaultTheme.js

enter image description here

I found the same file in some other path mentioned like below.

foundimage

I started to edit defaultTheme.js file config like below and pasted custom-logo image as well.

edited file

logo

after made changes, i have started server, that change is not reflected, i could see the same default wso2 devportal logo like below.

wso2 logo

custom-logo:

custom-logo

why is it not reflecting?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

撩发小公举 2025-02-08 21:28:09

似乎该文档仍未反映最新版本中所做的一些更改。

将自定义添加到Devportal/Publisher的另一种方法是更改​​UserTheme.js文件

参考: https://apim.docs.wso2.com/en/latest/latest/reference/customize-promize-product/custominizations /customizing-the-developer-portal/Overridident-developer-portal-theme/#global-theming

此文件可以位于 {apim_home}/repository/deployment/exployment/decloyment/server/jaggeryapps/jaggeryapps/devportal/site/site/site/site/site/site/ public/theme/usertheme.js

这是一个空的JSON文件,您可以在 defaulttheme.js 中添加您要覆盖的字段。

示例usertheme.js文件:

const Configurations = {

    custom: {

        appBar: {
            logo: '/site/public/images/my-custom-logo.png',
            logoHeight: 34,
            logoWidth: 'auto',
            background: '#0feedb',
            backgroundImage: '/site/public/images/appbarBack.png'
        }
    }
};

使用新的WSO2 API Manager 4.1包为我工作。
使用这种方法,您无需重新启动服务器即可生效。只需记住要硬刷新浏览器缓存,否则您可能看不到更改。

It seems that the documentation is still not reflecting some changes done in the most recent versions.

One other way of adding customizations to devportal/publisher is by altering the userTheme.js file

Reference: https://apim.docs.wso2.com/en/latest/reference/customize-product/customizations/customizing-the-developer-portal/overriding-developer-portal-theme/#global-theming

This file can be located at {APIM_HOME}/repository/deployment/server/jaggeryapps/devportal/site/public/theme/userTheme.js

This is an empty json file that you can add the fields defined in defaultTheme.js that you want to overwrite.

Example userTheme.js file:

const Configurations = {

    custom: {

        appBar: {
            logo: '/site/public/images/my-custom-logo.png',
            logoHeight: 34,
            logoWidth: 'auto',
            background: '#0feedb',
            backgroundImage: '/site/public/images/appbarBack.png'
        }
    }
};

This has worked for me using a new WSO2 API Manager 4.1 pack.
With this approach, you do not need to restart the server for the changes take effect. Just remember to hard refresh the browser cache, or else you might not see the changes.

美胚控场 2025-02-08 21:28:09

我已经修改了usertheme.js文件内容,如@Renan Martorelli所建议。现在,我能够在WSO2 APIM DEV PORTAL 4.1.0中看到反射。

userTheme.js:

const Configurations = {

 custom: {

    appBar: {
        logo: '/site/public/images/integration.jpg',
        logoHeight: 34,
        logoWidth: 'auto',
        background: '#0feedb',
        backgroundImage: '/site/public/images/appbarBack.png',
        searchInputBackground: '#fff',
        searchInputActiveBackground: '#fff',
        activeBackground: '#1c6584',
        showSearch: true,
        drawerWidth: 400,
    }
}

};

WSO2 Devportal:

“

I have modified userTheme.js file content as @Renan Martorelli suggested. now i can able to see reflection in WSO2 APIM Dev Portal 4.1.0.

userTheme.js:

const Configurations = {

 custom: {

    appBar: {
        logo: '/site/public/images/integration.jpg',
        logoHeight: 34,
        logoWidth: 'auto',
        background: '#0feedb',
        backgroundImage: '/site/public/images/appbarBack.png',
        searchInputBackground: '#fff',
        searchInputActiveBackground: '#fff',
        activeBackground: '#1c6584',
        showSearch: true,
        drawerWidth: 400,
    }
}

};

WSO2 DevPortal:

devportal

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文