You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
2.1 KiB

  1. # Documentation Best Practices
  2. This page exists to document best practices when writing documentation for QMK. Following these guidelines will help to keep a consistent tone and style, which will in turn help other people more easily understand QMK.
  3. # Page Opening
  4. Your documentation page should generally start with an H1 heading, followed by a 1 paragraph description of what the user will find on this page. Keep in mind that this heading and paragraph will sit next to the Table of Contents, so keep the heading short and avoid long strings with no whitespace.
  5. Example:
  6. ```
  7. # My Page Title
  8. This page covers my super cool feature. You can use this feature to make coffee, squeeze fresh oj, and have an egg mcmuffin and hashbrowns delivered from your local macca's by drone.
  9. ```
  10. # Headings
  11. Your page should generally have multiple "H1" headings. Only H1 and H2 headings will included in the Table of Contents, so plan them out appropriately. Excess width should be avoided in H1 and H2 headings to prevent the Table of Contents from getting too wide.
  12. # Styled Hint Blocks
  13. You can have styled hint blocks drawn around text to draw attention to it.
  14. ### Important
  15. ```
  16. !> This is important
  17. ```
  18. Renders as:
  19. !> This is important
  20. ### General Tips
  21. ```
  22. ?> This is a helpful tip.
  23. ```
  24. Renders as:
  25. ?> This is a helpful tip.
  26. # Documenting Features
  27. If you create a new feature for QMK, create a documentation page for it. It doesn't have to be very long, a few sentences describing your feature and a table listing any relevant keycodes is enough. Here is a basic template:
  28. ```markdown
  29. # My Cool Feature
  30. This page describes my cool feature. You can use my cool feature to make coffee and order cream and sugar to be delivered via drone.
  31. ## My Cool Feature Keycodes
  32. |Long Name|Short Name|Description|
  33. |---------|----------|-----------|
  34. |KC_COFFEE||Make Coffee|
  35. |KC_CREAM||Order Cream|
  36. |KC_SUGAR||Order Sugar|
  37. ```
  38. Place your documentation into `docs/feature_<my_cool_feature>.md`, and add that file to the appropriate place in `docs/_summary.md`. If you have added any keycodes be sure to add them to `docs/keycodes.md` with a link back to your feature page.