docs: rename INDEX files to meaningful names and fix navigation

- Renamed subdirectory INDEX.md files to section-specific names:
  - user/INDEX.md → user/user-guide.md
  - developer/INDEX.md → developer/development.md
  - operations/INDEX.md → operations/operations.md
  - contributing/INDEX.md → contributing/contributing.md
  - developer/api/INDEX.md → developer/api/api-reference.md
  - developer/api/collections/INDEX.md → developer/api/collections/collections-api.md

- Updated all internal links to use new filenames
- Updated navigation.go to skip subdirectory INDEX files from sidebar
- Added Dockerfile to include docs directory in container build

This fixes the issue where multiple 'INDEX' links appeared in the sidebar,
making navigation confusing. Now each section has a descriptive name.
This commit is contained in:
2026-02-02 20:25:18 -05:00
parent c194acf379
commit 35a039d720
9 changed files with 28 additions and 9 deletions
+3
View File
@@ -61,6 +61,9 @@ COPY --from=builder /app/templates ./templates
# Copy web assets (HTML, CSS, JS, etc.) # Copy web assets (HTML, CSS, JS, etc.)
COPY --from=builder /app/web ./web COPY --from=builder /app/web ./web
# Copy documentation
COPY --from=builder /app/docs ./docs
# Expose port # Expose port
EXPOSE 8765 EXPOSE 8765
+8 -8
View File
@@ -8,7 +8,7 @@ Complete guide to Bookhoard documentation. Find what you need quickly.
### 👤 For End Users ### 👤 For End Users
**[User Documentation Portal](user/INDEX.md)** - Guides for using Bookhoard features **[User Documentation Portal](user/user-guide.md)** - Guides for using Bookhoard features
- **Device Setup** - **Device Setup**
- [Kobo Setup Guide](user/devices/kobo-setup.md) - Complete Kobo e-reader configuration - [Kobo Setup Guide](user/devices/kobo-setup.md) - Complete Kobo e-reader configuration
@@ -25,11 +25,11 @@ Complete guide to Bookhoard documentation. Find what you need quickly.
### 👨‍💻 For Developers ### 👨‍💻 For Developers
**[Developer Documentation Portal](developer/INDEX.md)** - Technical documentation & API reference **[Developer Documentation Portal](developer/development.md)** - Technical documentation & API reference
- **API Documentation** - **API Documentation**
- [Complete API Reference](developer/api-reference.md) - Monolithic REST API reference (1,300+ lines) - [Complete API Reference](developer/api-reference.md) - Monolithic REST API reference (1,300+ lines)
- [Split Endpoint Docs](developer/api/INDEX.md) - Individual endpoints with interactive API Explorer - [Split Endpoint Docs](developer/api/api-reference.md) - Individual endpoints with interactive API Explorer
- [Collections API](developer/collections-api.md) - Collections management API - [Collections API](developer/collections-api.md) - Collections management API
- **Protocol Specifications** - **Protocol Specifications**
@@ -39,7 +39,7 @@ Complete guide to Bookhoard documentation. Find what you need quickly.
### 🔧 For Operations ### 🔧 For Operations
**[Operations Documentation Portal](operations/INDEX.md)** - Deployment & maintenance **[Operations Documentation Portal](operations/operations.md)** - Deployment & maintenance
- **Deployment** - **Deployment**
- [Troubleshooting Guide](operations/troubleshooting.md) - Common deployment issues and solutions - [Troubleshooting Guide](operations/troubleshooting.md) - Common deployment issues and solutions
@@ -51,7 +51,7 @@ Complete guide to Bookhoard documentation. Find what you need quickly.
### 🤝 For Contributors ### 🤝 For Contributors
**[Contributing Portal](contributing/INDEX.md)** - Development workflow **[Contributing Portal](contributing/contributing.md)** - Development workflow
- [Development Guide](contributing/DEVELOPMENT.md) - Architecture, setup, testing - [Development Guide](contributing/DEVELOPMENT.md) - Architecture, setup, testing
- [PROJECT_GUIDELINES.md](PROJECT_GUIDELINES.md) - Development rules and standards - [PROJECT_GUIDELINES.md](PROJECT_GUIDELINES.md) - Development rules and standards
@@ -63,8 +63,8 @@ Complete guide to Bookhoard documentation. Find what you need quickly.
| Want to... | Go to | | Want to... | Go to |
|------------|-------| |------------|-------|
| **Get started** | [README.md](../README.md) - Project overview and quick start | | **Get started** | [README.md](../README.md) - Project overview and quick start |
| **Set up a device** | [User Portal → Device Setup](user/INDEX.md) | | **Set up a device** | [User Portal → Device Setup](user/user-guide.md) |
| **Use the API** | [Developer Portal → API Docs](developer/INDEX.md) | | **Use the API** | [Developer Portal → API Docs](developer/development.md) |
| **Deploy Bookhoard** | [Operations Portal → Troubleshooting](operations/troubleshooting.md) | | **Deploy Bookhoard** | [Operations Portal → Troubleshooting](operations/troubleshooting.md) |
| **Contribute code** | [Contributing Portal → Development Guide](contributing/DEVELOPMENT.md) | | **Contribute code** | [Contributing Portal → Development Guide](contributing/DEVELOPMENT.md) |
| **Understand sync** | [User Portal → Sync Guide](user/sync-guide.md) | | **Understand sync** | [User Portal → Sync Guide](user/sync-guide.md) |
@@ -127,7 +127,7 @@ When adding new features:
1. **User-facing features** → Update relevant User docs 1. **User-facing features** → Update relevant User docs
2. **API endpoints** → Update [API Reference](developer/api-reference.md) & split docs 2. **API endpoints** → Update [API Reference](developer/api-reference.md) & split docs
3. **Backend changes** → Update [Development Guide](contributing/DEVELOPMENT.md) 3. **Backend changes** → Update [Development Guide](contributing/DEVELOPMENT.md)
4. **Deployment changes** → Update [Operations Portal](operations/INDEX.md) 4. **Deployment changes** → Update [Operations Portal](operations/operations.md)
Keep [PROJECT_GUIDELINES.md](PROJECT_GUIDELINES.md) in mind for documentation standards. Keep [PROJECT_GUIDELINES.md](PROJECT_GUIDELINES.md) in mind for documentation standards.
+17 -1
View File
@@ -28,6 +28,12 @@ func (h *DocsHandler) BuildNavigation() *templates.Navigation {
categories := make(map[string][]templates.NavItem) categories := make(map[string][]templates.NavItem)
for _, doc := range docs { for _, doc := range docs {
// Skip INDEX.md files in subdirectories (they're section landing pages, not nav items)
// Only show root INDEX.md, skip all others like user/INDEX.md, api/INDEX.md, etc.
if strings.HasSuffix(doc, "INDEX.md") && doc != "INDEX.md" {
continue
}
item := h.createNavItem(doc) item := h.createNavItem(doc)
category := h.getCategoryForNav(doc) category := h.getCategoryForNav(doc)
categories[category] = append(categories[category], item) categories[category] = append(categories[category], item)
@@ -100,9 +106,19 @@ func (h *DocsHandler) getDocTitle(docPath string) string {
switch filename { switch filename {
case "INDEX.md": case "INDEX.md":
return "Documentation Index" return "Documentation Index"
case "user/user-guide.md":
return "User Guide"
case "developer/development.md":
return "Developer Portal"
case "operations/operations.md":
return "Operations Guide"
case "contributing/contributing.md":
return "Contributing"
case "developer/api-reference.md": case "developer/api-reference.md":
return "API Reference" return "API Reference"
case "developer/collections-api.md": case "developer/api/api-reference.md":
return "API Reference"
case "developer/api/collections-api.md":
return "Collections API" return "Collections API"
case "developer/websocket-api.md": case "developer/websocket-api.md":
return "WebSocket API" return "WebSocket API"