Skip to content

Commit db429d9

Browse files
committed
add hint for template modify
1 parent 60e01f2 commit db429d9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

content/docs/Hydro/system/frontend-modify.md renamed to content/docs/Hydro/system/frontend-modify.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ title: 前端修改
2020
通常的,在您访问的 url 前加上 `view-source:`(如 `view-source:https://hydro.ac` 即可查看页面源代码,在第二行的 `<html data-page="xxx">``data-page` 值即为页面名(首页例外,为 `main.html`)。
2121
[默认 templates](https://github.com/hydro-dev/Hydro/tree/master/packages/ui-default/templates) 中找到对应文件,将**文件的全部内容** 复制到 `~/addon/templates/` 文件夹下后进行修改即可。
2222

23+
<Callout type="warn">
24+
修改模板可能导致系统升级后出现功能异常。为了更好的兼容性,我们推荐您使用插件的 frontend 功能动态注入/修改元素,而不是整个模板进行替换。
25+
26+
更多细节可参照 [插件开发](../dev/typescript)
27+
</Callout>
28+
2329
特别的,创建题目时的默认模板位于 `partials/problem_default.md`,创建训练计划时的默认模板位于 `partials/training_default.json`,修改方式同上。
2430

2531
以上所有更改均会在重启 Hydro 后生效。

0 commit comments

Comments
 (0)