doc-templates.mdx 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316
  1. ---
  2. title: "Documentation Templates"
  3. sidebarTitle: "Templates"
  4. description: "Templates for different types of Cline documentation"
  5. ---
  6. Use these templates as starting points for new documentation. Each template is designed for a specific purpose. Choose the one that best fits what you're documenting.
  7. ## Choosing a Template
  8. | If you're documenting... | Use this template |
  9. |--------------------------|-------------------|
  10. | What a feature does and how to use it | Feature Doc |
  11. | How to accomplish a specific task | How-To Guide |
  12. | Technical specifications or API details | Reference Doc |
  13. | A complete project walkthrough | Tutorial |
  14. ## Feature Doc
  15. Use this template when explaining a Cline feature. Focus on what it does, how to use it, and real examples.
  16. ````text
  17. ---
  18. title: "Feature Name"
  19. sidebarTitle: "Feature Name"
  20. ---
  21. [One sentence explaining what this feature does.]
  22. <Frame>
  23. <img src="..." alt="Feature in action" />
  24. </Frame>
  25. [1-2 paragraphs explaining the feature in plain terms. What problem does it
  26. solve? Why would someone use it?]
  27. ## How It Works
  28. [Explain the mechanics without jargon. What happens when you use this feature?]
  29. ## Using [Feature Name]
  30. [Show how to access and use it. Include the exact UI path.]
  31. ### [Option or Variation 1]
  32. [Details with examples]
  33. ### [Option or Variation 2]
  34. [Details with examples]
  35. ## Inspiration
  36. [Share how you personally use this feature. Use "I" voice. Give 2-3 real
  37. examples that spark imagination about what's possible.]
  38. <Note>
  39. [Important caveat, limitation, or requirement]
  40. </Note>
  41. ````
  42. ### Example: Checkpoints Feature
  43. Here's how the [Checkpoints](/core-workflows/checkpoints) doc follows this pattern:
  44. - Opens with one clear sentence about what checkpoints do
  45. - Shows a screenshot of the feature in action
  46. - Explains how checkpoints work under the hood
  47. - Shows exact steps to create and restore checkpoints
  48. - Includes real examples of when checkpoints save the day
  49. ## How-To Guide
  50. Use this template when showing how to accomplish a specific task. Focus on clear steps and troubleshooting.
  51. ````text
  52. ---
  53. title: "How to [Accomplish Task]"
  54. sidebarTitle: "[Short Title]"
  55. description: "[One sentence describing what the reader will learn]"
  56. ---
  57. [Brief intro explaining what problem this guide solves and what you'll end up
  58. with after following it.]
  59. ## Prerequisites
  60. [What the reader needs before starting. Keep it short. Link to other docs
  61. rather than explaining setup here.]
  62. - Cline installed and configured
  63. - [Other requirement]
  64. ## Steps
  65. <Steps>
  66. <Step title="[First Action]">
  67. [Clear instructions. Show exactly what to click or type.]
  68. ```bash
  69. example command if needed
  70. ```
  71. </Step>
  72. <Step title="[Second Action]">
  73. [Next step. Include screenshots for complex UI interactions.]
  74. <Frame>
  75. <img src="..." alt="What you should see" />
  76. </Frame>
  77. </Step>
  78. <Step title="[Final Action]">
  79. [Complete the task. Show the expected result.]
  80. </Step>
  81. </Steps>
  82. ## Troubleshooting
  83. Common issues and how to fix them:
  84. - **Problem description**: Solution in one or two sentences.
  85. - **Another problem**: Another solution.
  86. ## Next Steps
  87. <Card title="Related Feature" icon="arrow-right" href="/path/to/related">
  88. Continue learning with this related guide.
  89. </Card>
  90. ````
  91. ### Example: Your First Project
  92. The [Your First Project](/getting-started/your-first-project) guide follows this pattern:
  93. - Clear goal stated upfront
  94. - Prerequisites listed briefly
  95. - Step-by-step instructions with the Steps component
  96. - Troubleshooting section for common issues
  97. ## Reference Doc
  98. Use this template for technical specifications, API documentation, or detailed configuration options.
  99. ````text
  100. ---
  101. title: "[Component/API] Reference"
  102. sidebarTitle: "[Short Title]"
  103. description: "[What this reference covers]"
  104. ---
  105. [Brief description of what this reference documents and when you'd need it.]
  106. ## Overview
  107. [High-level explanation. What is this component? What role does it play?]
  108. ## [Category 1]
  109. ### [Item Name]
  110. [What it does in one sentence.]
  111. | Property | Type | Default | Description |
  112. |----------|------|---------|-------------|
  113. | `propertyName` | `string` | `"default"` | What this property controls |
  114. | `anotherProp` | `boolean` | `false` | What this does |
  115. **Example:**
  116. ```typescript
  117. // Show practical usage
  118. const example = {
  119. propertyName: "custom value",
  120. anotherProp: true
  121. }
  122. ```
  123. ### [Another Item]
  124. [Continue for each item in this category.]
  125. ## [Category 2]
  126. [Continue with other categories as needed.]
  127. ## Examples
  128. [Show 2-3 complete, practical examples that combine multiple concepts.]
  129. ### [Example 1 Title]
  130. ```typescript
  131. // Complete working example
  132. ```
  133. ### [Example 2 Title]
  134. ```typescript
  135. // Another complete example
  136. ```
  137. ## Related
  138. - [Related Doc 1](/path/to/doc) - Brief description
  139. - [Related Doc 2](/path/to/doc) - Brief description
  140. ````
  141. ### Example: Cline Tools Guide
  142. The [Cline Tools Guide](/tools-reference/all-cline-tools) follows this pattern:
  143. - Overview of the tool system
  144. - Each tool documented with parameters and examples
  145. - Practical examples showing tools in context
  146. ## Tutorial
  147. Use this template for comprehensive project walkthroughs where users build something from start to finish.
  148. ````text
  149. ---
  150. title: "[Build/Create X] Tutorial"
  151. sidebarTitle: "[Short Title]"
  152. description: "[What the reader will build]"
  153. ---
  154. In this tutorial, you'll build [specific outcome]. By the end, you'll have
  155. [tangible result you can see/use].
  156. <Frame>
  157. <img src="..." alt="Preview of what you'll build" />
  158. </Frame>
  159. ## What You'll Learn
  160. - [Skill or concept 1]
  161. - [Skill or concept 2]
  162. - [Skill or concept 3]
  163. ## Prerequisites
  164. [Required setup. Link to installation guides rather than repeating them.]
  165. - [Prerequisite 1]
  166. - [Prerequisite 2]
  167. ## Part 1: [First Major Section]
  168. [Introduction to this section. What are we doing and why?]
  169. ### [Subsection]
  170. [Detailed walkthrough with code blocks and explanations.]
  171. ```typescript
  172. // Code that the reader should write or understand
  173. ```
  174. [Explain what the code does and why.]
  175. ## Part 2: [Second Major Section]
  176. [Continue building on Part 1.]
  177. ### [Subsection]
  178. [More detailed walkthrough.]
  179. ## Part 3: [Final Section]
  180. [Complete the project.]
  181. ## Summary
  182. You built [what they built]. Along the way, you learned:
  183. - [Key takeaway 1]
  184. - [Key takeaway 2]
  185. - [Key takeaway 3]
  186. ## Next Steps
  187. <CardGroup cols={2}>
  188. <Card title="Go Deeper" icon="book" href="/path/to/advanced">
  189. Learn more advanced techniques.
  190. </Card>
  191. <Card title="Related Tutorial" icon="code" href="/path/to/related">
  192. Build something else with similar concepts.
  193. </Card>
  194. </CardGroup>
  195. ````
  196. ### Example Structure
  197. A good tutorial:
  198. - Shows the end result upfront so readers know what they're building
  199. - Breaks the work into logical parts
  200. - Explains the "why" alongside the "how"
  201. - Ends with clear next steps
  202. ## Quick Tips
  203. When using these templates:
  204. 1. **Delete sections you don't need.** Templates are starting points, not rigid structures.
  205. 2. **Add sections that make sense.** If your doc needs something not in the template, add it.
  206. 3. **Keep the reader moving forward.** Every section should lead naturally to the next.
  207. 4. **Test your own instructions.** Follow your guide from scratch to catch missing steps.
  208. <Tip>
  209. Use the `/write-docs` workflow to generate documentation from these templates automatically.
  210. Cline helps you fill in each section based on your project.
  211. </Tip>