个性化 Seahub
个性化 Logo 及 CSS 样式
创建个性化文件夹目录
mkdir-p/opt/seafile-data/seafile/seahub-data/custom
在升级过程中,Seafile 升级脚本会自动创建符号链接以保留你的定制内容。
个性化 Logo
- 将你的 logo 文件放入 custom/ 文件夹。
- 在 seahub_settings.py 中覆盖 LOGO_PATH:
- 默认 Logo 宽度和高度分别为 149px 和 32px,可根据实际情况修改:
LOGO_PATH='custom/mylogo.png'LOGO_PATH='custom/mylogo.png'# Logo的默认宽度和高度为 149 像素和 32 像素,根据实际情况修改LOGO_WIDTH=149LOGO_HEIGHT=32个性化 Favicon
- 将你的 favicon 文件放入 custom/ 文件夹。
- 在 seahub_settings.py 中覆盖 FAVICON_PATH:
FAVICON_PATH='custom/favicon.png'自定义 Seahub CSS 样式
- 将自定义 CSS 文件放入 custom/ 文件夹,例如 custom.css。
- 在 seahub_settings.py 中覆盖 BRANDING_CSS:
BRANDING_CSS="custom/custom.css"个性化 help 页面
首先进入 custom 目录(默认基于docker部署)
mkdir-p/opt/seafile-data/seafile/seahub-data/custom/templates/help/
cd/opt/seafile-data/seafile/seahub-data/custom
cp../../help/templates/help/install.htmltemplates/help/
编辑 templates/help/install.html 文件并保存,就可以看到新的 help 页面了。
在共享对话框中添加额外说明
1.在 seahub_settings.py 中添加如下配置:
ADDITIONAL_SHARE_DIALOG_NOTE={
'title':'Attention! Read before shareing files:',
'content':'Do not share personal or confidential official data with **.'}2.效果示例:共享对话框中会显示这条额外提示信息。

添加自定义导航
从专业版 7.0.9 开始,Seafile支持在首页上增加一些自定义的导航条目,以实现快速访问。这需要在conf/seahub_settings.py配置文件中增加如下配置信息:
CUSTOM_NAV_ITEMS=[
{'icon':'sf2-icon-star',
'desc':'自定义导航1',
'link':'https://www.seafile.com'
},
{'icon':'sf2-icon-wiki-view',
'desc':'自定义导航2',
'link':'https://cloud.seafile.com/published/seafile-manual-cn/home.md'
},
{'icon':'sf2-icon-wrench',
'desc':'自定义导航3',
'link':'http://www.example.com'
},]注:icon 字段目前仅支持配置为 Seafile 中自带的 sf2-icon 开头的图标。
然后重启seahub服务以生效。
再次登录Seafile系统首页后,您将会在左侧工具导航栏下看到新增的导航条目。
向“关于”对话框添加更多链接
从专业版 7.0.16 开始,这需要您在conf/seahub_settings.py配置文件中增加如下配置信息
ADDITIONAL_ABOUT_DIALOG_LINKS={
'seafile':'https://example.seahub.com/seahub',
'dtable-web':'https://example.seahub.com/dtable-web'}结果:
