|
| 1 | +// Getting Started: |
| 2 | +// |
| 3 | +// 1. Install lion: go install github.com/neongreen/mono/lion@latest |
| 4 | +// 2. Add lion comments to your Go code |
| 5 | +// 3. Run: lion generate |
| 6 | +// 4. Check the ./docs directory for generated markdown |
| 7 | +// |
| 8 | +// That's it! Lion will create one markdown file per topic. |
| 9 | +//lion:getting-started |
| 10 | +package main |
| 11 | + |
| 12 | +// Best Practices: |
| 13 | +// |
| 14 | +// - Use marker-at-end format for cleaner code (recommended) |
| 15 | +// - Choose descriptive topic names (e.g., "getting-started", "api-reference") |
| 16 | +// - Group related documentation under the same topic |
| 17 | +// - Use hyphens in topic names, not spaces or underscores |
| 18 | +// - Keep topics focused - split large topics into smaller ones |
| 19 | +// |
| 20 | +// Topic names become filenames, so keep them filesystem-friendly. |
| 21 | +//lion:best-practices |
| 22 | +const _ = 0 |
| 23 | + |
| 24 | +// Common Use Cases: |
| 25 | +// |
| 26 | +// 1. Project guides: Create "getting-started", "installation", "configuration" topics |
| 27 | +// 2. Architecture docs: Use "architecture", "design-decisions", "data-flow" topics |
| 28 | +// 3. API documentation: Create "api-overview", "endpoints", "authentication" topics |
| 29 | +// 4. Troubleshooting: Use "troubleshooting", "faq", "known-issues" topics |
| 30 | +// |
| 31 | +// Lion works best for narrative documentation that explains concepts, |
| 32 | +// not for API reference (use godoc for that). |
| 33 | +//lion:use-cases |
| 34 | +const __ = 0 |
| 35 | + |
| 36 | +// Syntax Reference: |
| 37 | +// |
| 38 | +// Format 1 - Marker at end (recommended): |
| 39 | +// // Regular comment lines |
| 40 | +// // explaining functionality |
| 41 | +// //lion:topic-name |
| 42 | +// |
| 43 | +// Format 2 - Single line: |
| 44 | +// //lion:topic-name Your content here |
| 45 | +// |
| 46 | +// Format 3 - Block comment: |
| 47 | +// /*lion:topic-name |
| 48 | +// Your multi-line |
| 49 | +// content here |
| 50 | +// */ |
| 51 | +// |
| 52 | +// All three formats generate identical output. |
| 53 | +// Choose the one that fits your documentation style. |
| 54 | +//lion:syntax-reference |
| 55 | +const ___ = 0 |
| 56 | + |
| 57 | +// Known Limitations: |
| 58 | +// |
| 59 | +// - Only processes .go files (not .md, .txt, etc.) |
| 60 | +// - Skips *_test.go files automatically |
| 61 | +// - Package comments must be BEFORE the package keyword |
| 62 | +// - No support for nested topics or hierarchies |
| 63 | +// - No cross-referencing between topics (yet) |
| 64 | +// - Output is always markdown (no HTML, PDF, etc.) |
| 65 | +// |
| 66 | +// These are intentional design decisions to keep lion simple and focused. |
| 67 | +//lion:known-limitations |
| 68 | +const ____ = 0 |
| 69 | + |
| 70 | +// Troubleshooting: |
| 71 | +// |
| 72 | +// Problem: "No documentation topics found" |
| 73 | +// Solution: Check that you're using the correct syntax and running |
| 74 | +// lion in the right directory. |
| 75 | +// |
| 76 | +// Problem: Package-level docs not showing up |
| 77 | +// Solution: Make sure the lion comment comes BEFORE "package foo" |
| 78 | +// |
| 79 | +// Problem: Marker-at-end not working |
| 80 | +// Solution: Ensure all lines before //lion:topic are regular comments |
| 81 | +// (no other //lion: markers in that comment block) |
| 82 | +// |
| 83 | +// Problem: Generated docs look wrong |
| 84 | +// Solution: Topics are combined from all files. Check for duplicate |
| 85 | +// topics in different files that might be merging. |
| 86 | +//lion:troubleshooting |
| 87 | +const _____ = 0 |
0 commit comments