reference: find a better way to present flag descriptions and example sections
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 文档
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- docker
调研方向
未指定文件或测试。先查看相关 issue 16469 和当前的 Docker 参考页面,然后比较各个项目如何组织 flag 描述和示例;当就一种一致的呈现方式达成共识并完成文档记录时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
- relates to https://github.com/docker/docs/issues/16469
Our reference docs currently use "descriptive" titles for flag descriptions. The idea behind that was to make these sections more discoverable, so that users that search for a specific "task" / "feature" would discover the flag they need to use for that.
For example;
Set the pull policy (--pull)
Using "Set the pull policy" allows the user to find the --pull flag, either from the right-hand TOC, or using search (within the docs, or through Google), and we also link to that section from the "options" table at the top of the page;
So, the current approach allows for two separate navigation entries into the content. However this approach also makes the right-hand navigation a bit unwieldy; the titles are long, and trying to find the right section for a specific flag from the right-hand TOC (not the table) is "messy".
We can probably improve some of that, but we need to brainstorm a bit on the right approach, and make sure that all projects that have pages in the reference section use the same approach.
A. Keep as-is, but add additional entries to the right-hand TOC
This could be a short-term solution; we keep the current headings, but repeat the links from the "options" table in the right-hand TOC. This means that (some) sections will appear twice in the TOC;
- once using
--flagnameas title (e.g.--pull) - once using the heading title (
Set the pull policy (--pull))
This approach
- 👍 makes the
--flagnameseasier to discover in the right-hand navigation - 👍 example titles continue to be listed in the navigation to help discoverability
- 👎 possibly confusing (two links to the same section)
B. Use --flagname for the headings, and put the examples as separate headings inside that
This approach would "split" the flagname and examples. Both are linkable;
--workdir, -w
Set the working directory inside the container.
Set a custom working directory for a container
Description of this example, mention
WORKDIRetc etc$ docker container run --workdir=/foo .....
- 👍 makes the
--flagnameseasier to discover in the right-hand navigation - 👎 / ❓ if we show both the
--flagnameand the "Set a custom working directory for a container" in the TOC, the TOC may still be cluttered
C. Separate examples and flag descriptions
Similar to A., but actually make the flag description and examples related to the flag separate sections (not nested).
- 👍 makes the
--flagnameseasier to discover in the right-hand navigation - 👍 example titles continue to be listed in the navigation to help discoverability
- 👎 navigating to the flag description only provides a (basic) description for the flag; sometimes an example is more useful to understand "why to use this flag"
- ☝️ we can still link from the flag description section to the corresponding example(s), but this requires additional maintenance, and may make the flag description section a bit "cluttered" (short description, followed by potentially multiple links to the examples).
D. Other options?
Perhaps there's other options?
- 主要语言
- Markdown
- 星标
- 4.7k
- 派生
- 8.5k
- 平均合并
- 2 天 8 小时
- 30 天内合并 PR
- 129
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
docker/docs 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 84/100
维护者通常 1 天内回复
-
[docs-scanner] Inconsistent information about what gets deleted when Docker Offload v1 session ends可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 1/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
status/triage
难度 1/5 1 小时以内 新手友好度 92/100
维护者通常 1 天内回复
-
[docs-scanner] Confusing explanation of approval-required outcome vs permit in MCP policy可能已有人在做 @dave123981 于 2 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 88/100
维护者通常 1 天内回复
-
[docs-scanner] Contradictory information about MCP approval fields in audit records可能已有人在做 @dave123981 于 2 天前认领。 未关闭
难度 1/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
相似的 Issue
-
🧩 Docs job fails type-checking `generate-plugin-docs.ts`可能已有人在做 @X-Guardian 今天认领。 未关闭discussion
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
Installation guide's prerequisites leave out ca-certificates, which a no-recommends system needs未关闭bot-found documentation priority: P3
难度 1/5 1 小时以内 新手友好度 94/100
madenvel/KalinkaPlayer#544 ·
-
14.3.x
难度 2/5 1-3 小时 新手友好度 68/100
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 76/100
githubnext/gh-aw-workshop#5522 ·
维护者通常 1 天内回复