Some suggestions about documentation formatting
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 文档
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
调研方向
Start by reviewing the documentation examples cited in the issue, including view.adoc, preprocessor.html, and the Event! datatype example, then inventory the repository's existing formatting conventions. Done means the listed header, emphasis, link, admonition, code-word, type-annotation, and spacing conventions are applied consistently and remain suitable for translation.
由索引模型根据 Issue 内容生成。
描述
Here are some suggestions about the formatting of documentation which came up while I was working on the translation. The goal is to make the documentation look less confusing and more compatible with different translations in terms of formatting.
Document Header
Suggestion: Add an attribute :toc-title: Table of Contents.
Reason: This attribute represents the TOC label. The translator only need to change "Table of Contents" to the translated language without adding a new attribute manually.
Bold and Italic
Suggestion: Always using __text__ and **text** instead of _text_ and *text*.
Reason: Like in Chinese and Japanese, there is no spacing between words, so single _ or * will be treated as normal texts instead of formatting instructions. It is better to avoid translators changing the formatting manually.
Link and Anchor
Suggestion: Always use link:url[text] syntax. Note the link: prefix must be added.
Reason: This can work without spacing around the link. Maybe just I can't figure out how to make << xxx >> work.
Suggestion: Always using link:#a-anchor[text] for links within the document and add an explicit anchor ID [#a-anchor] right above the section title to link.
Reason: The anchor for a section is dependent on the text of that section, which can be messed up after translation. This works across different translations.
Suggestion: Use link:another-document.adoc[text] for links between documents. Note the extension of the link is adoc.
Reason: This makes the link works both on github and gitbook. Gitbook will automatically change .adoc to .html.
Admonition
Suggestion: Always using the syntax described below (NOTE can be other type):
[NOTE, caption=Note]
====
Something to note.
====
Reason: That "Note" of the caption attribute is the label displayed in the left of the admonition block. The translator only need to change into translated language without changing the formatting. The label of inline admonitions (NOTE: ) can't be changed (or maybe I couldn't figure it out).
Word Name
Suggestion: Always surround the word which means Red word with ` (also in section titles, without uppercase).
Reason: Red word (keyword in DSL, or function name) is not that distinguishable from normal English words (in my opinion). If it is used in section titles without surrounded in a code span, it can be hard for translators to decide whether to translate it or not, and also may be confusing for normal readers. I have tried to make it a code span in the section title and it renders good.
Suggestion: Maybe avoid using red-words like normal English words in sentences.
Reason: Like the example below from the description of check in view.adoc, It sounds stupid if I keep left and right as is after translating. Or wrap left and right into a parenthesis and annotate after translating left and right, which also doesn't looks so good.
para: Thealignfield controls if the text is displayed on theleftor on therightside.
para:align字段控制该文本是靠left边显示还是靠right边显示。
para:align字段控制该文本是靠左边(left)显示还是靠右边(right)显示。
Type Annotation
Suggestion: Unify the type annotation over all documentation.
Reason: It is good to do so. Currently it can appear in two different kind of contents (see below), function syntax code blocks and some tables. It is not always at the end of a paragraph.
From macro of preprocessor:
#macro <name> func <spec> <body>
#macro <pattern> func <spec> <body>
<name> : name of the macro function (set-word!).
<pattern> : matching rule for triggering the macro (block!, word!, lit-word!).
<spec> : specification block for the macro function.
<body> : body block of the macro function.
From Event! datatype of view:
|`offset`| Offset of mouse cursor relative to the face object when the event occurred (`pair!`). For gestures events, returns the center point coordinates.
Suggestion: Don't use "," to separate multiple types, nor "or" needed.
Reason: Removing these won't cause confusion. The datatype won't lose coloring as the example of #macro above.
Spacing
Suggestion: Always add a separate line between the actual content.
Reason: This can avoid content format corruption in some languages.
- 主要语言
- CSS
- 星标
- 69
- 派生
- 48
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
red/docs 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 72/100
-
What's `#INF`?未关闭
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 1/5 1 小时以内 新手友好度 65/100
-
难度 1/5 1 小时以内 新手友好度 68/100
-
`/local` is undocumented in `function!` spec docs可能重新可做 @greggirwin 于 389 天前认领,目前没有进行中的 PR。 未关闭
相似的 Issue
-
documentation good first issue
难度 2/5 半天 新手友好度 72/100
sujithputta02/Esapay#13 ·
-
good first issue
难度 1/5 1 小时以内 新手友好度 88/100
saayam-for-all/webapp#1919 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
Uuriko/project-room#3728 ·
维护者通常 1 天内回复
-
documentation
难度 2/5 1-3 小时 新手友好度 62/100
devops-thiago/ThrillhouseBot#1132 ·
维护者通常 1 天内回复
-
Old package name @routedock/sdk is still used in JSDoc, test run instructions and docs可能已有人在做 @TS-mfon 今天认领。 未关闭docs dx P2 Stellar Wave Wave 10
难度 2/5 1-3 小时 新手友好度 82/100
winsznx/routedock#576 · 5 条评论 ·
维护者通常 1 天内回复