Introduce automated documentation linting

未关闭
#643 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
markdown

调研方向

未指定任何仓库文件或测试。首先阅读链接的 Vale、GitLab technical-writing 以及相关 issue(#642 和 #519)参考资料,然后将提议的 linting 阶段映射到此文档项目。要视为完成,需要一组达成共识的检查、关于构建失败和导入内容的决定,以及记录在案的实现范围。

由索引模型根据 Issue 内容生成。

描述

enhancement

Goal 🏁

Improve consistency across the documentation for both readers and writers. Or at least highlight the inconsistencies.

This suggestion is prompted:

Tooling 🔨

There are several linting tools out there. But, Vale allows you to apply different style rules or guides taken from various different linters. You can also write your own rules in YAML.

Vale aside: there are lots of other potential tools around. But Vale is mentioned a lot.

How do other people work? 👀

For example, GitLab's technical writers use:

  • Text content and writing style: markdownlint, Vale
  • Text formatting: Markdownlint, yamllint
  • Link validity: nanoc
  • File permissions and naming: lint-doc.sh

I'm more interested in the stages, than the specific tools chosen by the GitLab team. We don't have any of these right now. I also opened #642 for link checking as I believe that's a self-contained problem.

Note that tools like markdownlint are actually focused on markup consistency, not content consistency. This might be another benefit. We — understandably — have a mixture of Markdown styles across our documentation due to different author contributions.

Considerations 💭

  • Is this a good idea, in principle?
  • Are the checks useful or distractingly noisy?
  • Would this add friction for less regular contributors?
  • Should failed linting cause an outright failure of a build, or just alert "content managers" to this to later fix up? If failing, what types of lint failures should fail a build?
  • What checks do we want (relates to #519)?
  • Are there issues of having consistency across imported content? We include content in the documentation from the source of cohort-extractor and Data Builder. This content may not be subject to the same checks.
主要语言
Python
星标
48
派生
10
平均合并
1 天 12 小时
30 天内合并 PR
11

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

opensafely/documentation 的其他 Issue

查看 opensafely/documentation 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。