The rules that keep .md files consistent, portable and lint-clean: file naming, heading structure, spacing, lists, links, code fences and line length. Based on CommonMark, GFM and markdownlint defaults.
getting-started.md, api-reference.mdREADME.md, CHANGELOG.md, CONTRIBUTING.md, LICENSE, CODE_OF_CONDUCT.md, SECURITY.mdimages/ or assets/ folder next to the docs and link them relativelyExactly one H1 (#) as the first line: the document title
Write for the raw reader too: a well-formatted .md file should be easy to read in a terminal or a diff, not only when rendered. Enforce the rules automatically with markdownlint + Prettier (see Lint & format Markdown).