Repository navigation
docs: 主题设置的声明、读取与约定 - #16
Merged
Merged
Conversation
主题开发页新增「主题设置」:theme.json 的 config 字段与分组标题、GET/PUT
/api/themes/{short}/config 的返回与各种失败情况、可以直接复制的读取代码、主题自带设置界面的
保存规则,以及四条约定(key 不改名、设置公开、设置只管显示、原始 HTML 不进页面)。接口表和
架构页的路由列表同步。
分组标题一段补上面板的三种排版:6 项以内单列,超过 6 项两列,分成两组以上时左侧切换分组; 以及「通用」组、空标题不算一组、只改 theme.json 即可。
# Conflicts: # src/content/dev/theme.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
主题开发页新增「主题设置」:
theme.json的config字段、五种类型与title分组标题,以及设置项多少时面板的三种排版(6 项以内单列、超过 6 项两列、分成两组以上时左侧切换分组)GET /api/themes/{short}/config的返回,以及 401、404、网络错误时一律用默认值PUT保存的规则与示例代码(先读 hub 里的原始对象、只存改过的项、失败要报出来),写入要求主题已安装key发布后不改名、设置是公开的、设置只管显示不管权限、原始 HTML 不进页面(Markdown 须转义 HTML)接口表改为读取五个、PUT 另见后文,架构页路由列表加上两条。对应 monitor-probe/monitor#50,hub 发版后合并。