|
| 1 | +--- |
| 2 | +draft: true |
| 3 | +title: "Documentation Inception" |
| 4 | +--- |
| 5 | + |
| 6 | +# Documentation |
| 7 | + |
| 8 | +This directory contains all documentation organized into sections. |
| 9 | + |
| 10 | +## Structure |
| 11 | + |
| 12 | +- **`volunteers/`** - Guides for conference volunteers and committee members |
| 13 | +- **`speakers/`** - Information and guides for speakers |
| 14 | +- **`resources/`** - External resources and helpful links |
| 15 | + |
| 16 | +## Adding a New Doc |
| 17 | + |
| 18 | +Create a markdown file in the appropriate subfolder: |
| 19 | + |
| 20 | +```bash |
| 21 | +# For volunteer guides |
| 22 | +src/content/docs/volunteers/your-guide.md |
| 23 | + |
| 24 | +# For speaker guides |
| 25 | +src/content/docs/speakers/your-guide.md |
| 26 | + |
| 27 | +# For other resources |
| 28 | +src/content/docs/resources/your-resource.md |
| 29 | +``` |
| 30 | + |
| 31 | +## Frontmatter |
| 32 | + |
| 33 | +Basic frontmatter structure: |
| 34 | + |
| 35 | +```yaml |
| 36 | +--- |
| 37 | +title: "Your Doc Title" |
| 38 | +description: "Brief description" |
| 39 | +section: "volunteers" # optional - inferred from folder if not specified |
| 40 | +weight: 1 # optional - controls ordering within section |
| 41 | +--- |
| 42 | +``` |
| 43 | + |
| 44 | +## External Resources |
| 45 | + |
| 46 | +To link to an external resource instead of creating a doc page: |
| 47 | + |
| 48 | +```yaml |
| 49 | +--- |
| 50 | +title: "Astro Framework" |
| 51 | +description: "Learn about Astro" |
| 52 | +section: "resources" |
| 53 | +url: "https://astro.build" # opens in new tab with icon |
| 54 | +--- |
| 55 | +``` |
| 56 | + |
| 57 | +## Section Ordering |
| 58 | + |
| 59 | +Sections appear in this order: |
| 60 | + |
| 61 | +1. Speakers |
| 62 | +2. Volunteers |
| 63 | +3. Resources |
| 64 | +4. Any other sections (alphabetically) |
| 65 | + |
| 66 | +Within each section, docs are sorted by `weight` (lower numbers first). |
| 67 | + |
| 68 | +## Creating a New Section |
| 69 | + |
| 70 | +You can add new sections by simply creating a new folder: |
| 71 | + |
| 72 | +```bash |
| 73 | +src/content/docs/sponsors/sponsor-info.md |
| 74 | +``` |
| 75 | + |
| 76 | +This will automatically create a "Sponsors" section. The section name is inferred from the folder name and humanized (e.g., `my-section` becomes "My Section"). |
| 77 | + |
| 78 | +### Customizing Section Labels and Order |
| 79 | + |
| 80 | +To customize section display names and ordering, edit `src/lib/utils/docsHelpers.ts`: |
| 81 | + |
| 82 | +**1. Add a custom label:** |
| 83 | + |
| 84 | +```typescript |
| 85 | +const SECTION_LABELS: Record<string, string> = { |
| 86 | + volunteers: "Volunteer Guides", |
| 87 | + speakers: "Speaker Guides", |
| 88 | + resources: "Resources", |
| 89 | + sponsors: "Sponsor Information", // add your new section here |
| 90 | +}; |
| 91 | +``` |
| 92 | + |
| 93 | +**2. Add to the ordering:** |
| 94 | + |
| 95 | +```typescript |
| 96 | +const SECTION_ORDER = ["speakers", "volunteers", "resources", "sponsors"] as const; |
| 97 | +``` |
| 98 | + |
| 99 | +Sections not in `SECTION_ORDER` will appear after the ordered ones, sorted alphabetically. |
0 commit comments