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 摘要。