本文介绍了Docker Openedx devstack主题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在基于OpenEdx的基于Docker的Docker DevStack中安装并启用自定义主题?

How do I install and enable my custom theme in OpenEdx's docker based DevStack?

  • 我使用综合主题
  • 我在Linux上使用docker

推荐答案

LMS和CMS从容器文件系统的以下位置读取许多配置设置:

The LMS and CMS read many configuration settings from the container filesystem in the following locations:

/edx/app/edxapp/cms.auth.json

/edx/app/edxapp/cms.auth.json

由于您使用的是Docker DevStack,因此可以将它们封装到LMS,CMS中以查找这些文件.

Since you are using docker DevStack, shell into LMS, CMS to find those files.

shell进入LMS

shell into LMS

make lms-shell

Shell进入CMS

Shell into CMS

make studio-shell

您可以在Open edX安装可访问的文件系统上的任何位置创建此目录.例如,您可以将其放置在文件系统的根目录下,该目录名为/my-open-edx-themes .

You can create this directory at any location on a file system that is accessible to your Open edX installation. For example, you might place it at the root of the file system in a directory named /my-open-edx-themes.

在主题目录及其所有子目录上设置文件权限,以为Ubuntu用户启用读写权限.

Set the file permissions on the themes directory, and all of its subdirectories, to enable read+write permissions for the Ubuntu user.

sudo chown -R edxapp:edxapp /my-open-edx-themes
sudo chmod -R u+rw /my-open-edx-themes

对于要设置主题的每个Open edX组件,设置

For each Open edX component that you want to theme, set the

"DEFAULT_SITE_THEME":您的主题名称"

"DEFAULT_SITE_THEME": "Your-theme-name "

对于LMS,

对于Studio,

对于电子商务,

对于要应用主题的每个Open edX组件,将主题目录的绝对路径添加到

And for each Open edX component that you want to apply a theme to, add the absolute path of the themes directory to the

配置属性.

对于LMS和Studio,

For LMS and Studio,

"COMPREHENSIVE_THEME_DIRS": [
    "/my-open-edx-themes/edx-platform"
]

对于电子商务,

COMPREHENSIVE_THEME_DIRS: ["/my-open-edx-themes/ecommerce"]

最后,重新启动所有服务器.

Finally, Restart all servers.

有关更多信息,请遵循此文档.

For more info, please follow this documentation.

http://edx.readthedocs.io/projects/edx-installing-configuring-and-running/zh-CN/latest/configuration/changing_appearance/theming/enable_themes.html

如果还有其他问题,请添加评论.

Add comments if you have any additional questions.

这篇关于Docker Openedx devstack主题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-26 04:31