Skip to content

docslab-co/basedoc-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Basedoc Starter

A starter template for creating documentation sites with Basedoc. Fork this repo and start writing docs in minutes.

Quick Start

  1. Fork this repository (or click "Use this template" on GitHub)
  2. Connect to Basedoc at basedoc.co and link your forked repo
  3. Edit the docs at the project root and push your changes — your site updates automatically

Agents

This repo includes AGENTS.md so coding agents know this is a Basedoc site. For best results when editing docs or basedoc.json, install the writing-basedoc-docs skill from docslab-co/basedoc-skills using --skill writing-basedoc-docs (full steps are in that repository’s README). Then ask your agent to update the docs.

Project Structure

This is an example project, with an index and root-level pages, plus an API docs section and a Guides directory. Any media for logos or post content should be in the media directory.

├── basedoc.json               # Site configuration
├── index.mdx                  # Homepage
├── getting-started.mdx        # Getting started guide
├── concepts.mdx               # Core concepts
├── guides/
│   ├── installation.mdx       # Installation guide
│   └── deployment.mdx         # Deployment guide
├── api/
│   ├── overview.mdx           # API overview (regular page)
│   ├── list-users.mdx         # GET /v1/users endpoint
│   ├── create-user.mdx        # POST /v1/users endpoint
│   ├── get-user.mdx           # GET /v1/users/{userId} endpoint
│   └── schemas/
│       ├── user.mdx           # User schema definition
│       └── create-user.mdx    # CreateUser schema definition
└── media/                     # Images, logos, favicons

Configuration

Edit basedoc.json to customize your site:

{
  "title": "Your Site Name",
  "description": "Your site description",
  "logo": {
    "lightMode": "/media/logo.png",
    "darkMode": "/media/logo-dark.png"
  },
  "highlightColors": {
    "lightMode": "#4F46E5",
    "darkMode": "#818CF8"
  },
  "navigation": [...]
}

Read the config docs

Key settings

Field Description
title Site name shown in the header
description Site description for SEO
logo Logo images for light and dark mode
highlightColors Brand accent colors for light and dark mode
navigation Sidebar navigation structure
api.custom.serverUrl Base URL shown in API endpoint docs
externalLinks Links displayed in the header (e.g. GitHub)

See the full schema for all available options.

Writing Pages

Create .mdx or .md files at the project root (or in subfolders). Each page needs YAML frontmatter:

---
title: My Page Title
description: A brief description of this page
---

# My Page Title

Your content here. Supports full Markdown and MDX.

Frontmatter fields

Field Required Description
title Yes Page title (used in head and navigation)
description No Page description (meta tag / subtitle)

Navigation

Add your page to the navigation array in basedoc.json:

{
  "navigation": [
    "my-page",
    {
      "title": "Section Name",
      "pages": ["section/page-one", "section/page-two"]
    }
  ]
}

Navigation items can be:

  • A string (page path from the project root, without extension)
  • An object with title and path for custom display names
  • An object with title and pages for grouped sections

Writing API Docs

API endpoint pages use special frontmatter under the api.endpoint key.

Endpoint page

---
api:
  endpoint:
    get /v1/resource:
      summary: Short description of the endpoint
      auth: bearer
      params:
        path:
          id: string
        query:
          limit?: number
      responses:
        200:
          description: Success
          schema: MySchema
          example:
            id: abc123
            name: Example
---

## Overview

<Endpoint /​>

## Request parameters

<Params /​>

## Request body

<Body />

## Request examples

<RequestExamples /​>

## Responses

<Responses /​>

Available API components

Use these MDX components in your API docs pages:

Component Description
<Endpoint /> HTTP method, path, summary, auth
<Params /> All parameters
<Params location="query" /> Parameters filtered by location
<Body /> Request body fields
<Responses /> All responses
<Response code="200" /> A single response

Schema files

Define reusable schemas in api/schemas/:

---
api:
  schema: MySchema
---

id: string
Unique identifier

name: string
Display name

createdAt: datetime
When the resource was created

optionalField?: string
This field is optional (note the `?`)

Each line is fieldName: type (required) or fieldName?: type (optional). Lines below a field definition become its description.

Reference schemas in endpoint pages with schema: MySchema in request body or response definitions.

Adding Images

Place images in the media/ folder and reference them in your pages:

![Screenshot](/media/screenshot.png)

Add your logo files to media/ and update basedoc.json accordingly.

Learn More

About

Fork this repo to get started with a new Basedoc project.

Resources

Stars

Watchers

Forks

Contributors

Languages