Appearance
Docs Service
Customer-facing documentation site built with VitePress.
Overview
The docs service is Garnet's official documentation website, providing comprehensive guides, tutorials, and reference materials for marketplace operators and vendors.
Technology Stack
- Framework: VitePress (Vue.js-based static site generator)
- Language: Markdown with TypeScript
- Styling: CSS
- Build: Vite
- Deployment: AWS (Serverless)
Project Structure
.
├── .vitepress/ # VitePress configuration
│ ├── config.ts # Site configuration and navigation
│ └── theme/ # Custom theme components
├── get-started/ # Getting started guides
├── accounts/ # Account management docs
├── orders/ # Order management guides
├── listings/ # Product listing documentation
├── integrations/ # Platform integration guides
├── shipping/ # Shipping documentation
├── finance/ # Finance and payout guides
├── settings/ # Settings documentation
├── appearance/ # Marketplace appearance customization
├── custom-pages/ # Custom page documentation
├── notifications/ # Notification settings
├── messaging/ # Customer messaging
├── administration/ # Admin features
├── customizations/ # Advanced customizations
├── vendor-guide/ # Vendor-specific guides
├── releases/ # Release notes (current year)
├── releases-2024/ # 2024 release notes archive
├── blog/ # Blog posts
├── faq/ # Frequently asked questions
├── public/ # Static assets (images, etc.)
├── index.md # Homepage
└── serverless.yml # AWS deployment configDevelopment Commands
bash
pnpm start # Start dev server on port 3010
pnpm build # Build static site to dist/
pnpm preview # Preview production build
pnpm test # Run validation tests
pnpm deploy-prod # Build and deploy to productionWriting Documentation
File Structure
- Each page is a Markdown (
.md) file - Organize pages in topic-based directories
- Use kebab-case for file names:
my-page.md - Add frontmatter for metadata
Frontmatter Example
markdown
---
title: Page Title
description: Brief description for SEO
---
# Page ContentNavigation
Edit .vitepress/config.ts to add pages to navigation:
sidebar: Left sidebar navigationnav: Top navigation bar
Images
- Place images in
public/directory - Reference as
/path/to/image.png - Optimize images before committing
- Use descriptive alt text
Links
- Use relative links for internal pages:
[Link Text](./other-page.md) - Use absolute URLs for external links
- Links are validated in tests
Release Notes
Two directories for release notes:
- releases/: Current year release notes
- releases-2024/: Archived 2024 release notes
Each release note should:
- Include date in format:
YYYY-MM-DD - Have clear title describing the feature
- Include screenshots or images when possible
- Link to relevant documentation pages
Testing
Run automated tests before deploying:
bash
pnpm testTests check for:
- Broken internal links
- Missing page descriptions
- Invalid frontmatter
Building
VitePress generates a static site:
bash
pnpm buildOutput in dist/ directory ready for deployment.
Deployment
Deployed to AWS using Serverless Framework:
bash
pnpm deploy-prodThis will:
- Build the static site
- Upload to S3
- Configure CloudFront distribution
- Deploy via serverless.yml
Custom Theme
Custom theme components in .vitepress/theme/:
- Vue components for custom layouts
- Global styles
- Theme overrides
Content Guidelines
- Clear and Concise: Use simple language
- Screenshots: Include visuals for UI features
- Step-by-Step: Break down complex processes
- Examples: Provide real-world examples
- Search-Friendly: Use descriptive titles and headings
- Up-to-Date: Keep content synchronized with product changes
Important Notes
- All documentation is public
- Keep content customer-focused
- Test all links before deploying
- Optimize images for web
- Use consistent formatting
- Update release notes regularly - when creating release notes, coordinate with the monthly newsletter process documented in @services/business/product-update/CLAUDE.md
- Coordinate with product updates
Site Configuration
Main configuration in .vitepress/config.ts:
- Site metadata
- Navigation structure
- Plugin configuration
- Build options
- Theme settings
URL Structure
Documentation is served at: https://garnetmarketplace.com/docs/
- Clean URLs without
.htmlextension - SEO-optimized
- Sitemap generated automatically