Documentation Style Guide
This style guide provides standards and guidelines for writing and formatting documentation for the DeepLint project. Following these guidelines ensures consistency across all documentation files and improves readability for users.
Document Structure
File Organization
Each documentation file should follow this general structure:
Title: A clear, descriptive title using a single H1 (
#
) headingIntroduction: A brief overview of what the document covers
Main Content: The primary content of the document, organized into logical sections
Related Resources: Links to related documentation
Next Steps (optional): Suggestions for what to read or do next
Example:
Heading Hierarchy
Use a consistent heading hierarchy:
#
(H1): Document title (only one per document)##
(H2): Major sections###
(H3): Subsections####
(H4): Sub-subsections (use sparingly)
Do not skip heading levels (e.g., don't go from H2 to H4 without an H3 in between).
Navigation Hints
For documents that are part of a series, include navigation hints at the top and bottom:
At the bottom of the document, include navigation links:
Content Formatting
Text Formatting
Use bold (
**bold**
) for emphasis and UI elementsUse italic (
*italic*
) for introducing new termsUse
code
(`code`
) for code snippets, file names, and commandsUse > blockquotes for important notes or quotes
Lists
Use unordered lists (
-
) for items without a specific orderUse ordered lists (
1.
,2.
, etc.) for sequential steps or prioritized itemsMaintain consistent indentation for nested lists (2 spaces)
Code Blocks
Use triple backticks (
```
) for code blocksSpecify the language for syntax highlighting (e.g.,
```typescript
)For terminal commands, use
```bash
and include the command prompt ($
) for clarity
Example:
Tables
Use tables for structured data:
Hints and Callouts
Use GitBook hint blocks for important information:
Tabs
Use GitBook tabs for alternative approaches or examples:
Keep diagrams simple and focused on the key concepts. Include a text explanation of the diagram for accessibility.
Images
When including images:
Use descriptive file names
Include alt text for accessibility
Keep images in an
assets
directoryOptimize images for web viewing
Content Guidelines
Voice and Tone
Use a clear, direct, and professional tone
Write in the present tense
Use active voice instead of passive voice
Address the reader directly using "you"
Terminology
Use consistent terminology throughout the documentation
Define technical terms when they are first introduced
Follow the project's glossary for specific terms
Examples
Include practical, real-world examples
Ensure examples are accurate and tested
Provide context for examples
Use consistent formatting for examples
Command Line Examples
When documenting command line usage:
Include the command and its output
Use
$
to indicate the command promptUse
#
for comments within command blocksShow example output when relevant
External Links
For external links, include the full URL and a descriptive link text:
Versioning and Status Indicators
Version Information
Indicate when features are version-specific:
Feature Status
Clearly mark the status of features:
✅ Implemented: Feature is fully implemented and available
⚠️ Partial: Feature is partially implemented
Example:
Accessibility
Use descriptive link text (not "click here" or "read more")
Include alt text for images
Ensure color is not the only way to convey information
Use proper heading hierarchy for screen readers
File Naming
Use lowercase for file names
Use hyphens (
-
) instead of spaces or underscoresUse descriptive, concise names
Group related files in directories
Examples:
getting-started.md
command-system.md
context-building.md
Implementation Guidelines
When implementing this style guide:
Start with high-visibility documents (README, Getting Started guides)
Update one section of documentation at a time
Use search and replace for consistent terminology
Verify links after making changes
Test code examples to ensure they work
Applying the Style Guide
When applying this style guide to existing documentation:
Structure: Ensure each document follows the recommended structure
Headings: Verify heading hierarchy is consistent
Formatting: Apply consistent formatting for code, lists, tables, etc.
Examples: Update examples to follow the guidelines
Cross-References: Check and update all internal and external links
Status Indicators: Add status indicators for features
Navigation: Add navigation hints for document series
Conclusion
Following this style guide ensures a consistent, high-quality documentation experience for DeepLint users. If you have questions or suggestions for improving this guide, please open an issue or pull request.
Last updated