| name | gitbook-1-structure-content-properly |
| description | Sub-skill of gitbook: 1. Structure Content Properly (+3). |
| version | 1.0.0 |
| category | development |
| type | reference |
| scripts_exempt | true |
1. Structure Content Properly (+3)
1. Structure Content Properly
# Good structure
docs/
โโโ README.md # Landing page
โโโ SUMMARY.md # Navigation
โโโ getting-started/
โ โโโ README.md # Section intro
โ โโโ installation.md
โ โโโ quickstart.md
โโโ guides/
โโโ README.md
โโโ ...
2. Use Meaningful Slugs
# SUMMARY.md - Good slugs
* [Installation Guide](getting-started/installation.md)
* [API Reference](api/reference.md)
# Avoid
* [Page 1](page1.md)
* [Untitled](untitled-1.md)
3. Maintain Version Consistency
versions = [
{"title": "v1.0", "slug": "v1"},
{"title": "v2.0", "slug": "v2"},
{"title": "Latest", "slug": "latest"}
]
4. Validate Before Publish
def validate_docs(docs_path):
"""Validate docs before publishing."""
issues = []
if not (docs_path / "SUMMARY.md").exists():
issues.append("Missing SUMMARY.md")
return issues