Skip to content

Commit c90aa60

Browse files
add warp.md for use in the warp terminal (#4632)
1 parent d5b7ca0 commit c90aa60

File tree

1 file changed

+148
-0
lines changed

1 file changed

+148
-0
lines changed

warp.md

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
# WARP.md
2+
3+
This file provides guidance to WARP (warp.dev) when working with code in this repository.
4+
5+
## Repository Overview
6+
7+
This is the Tiger Data documentation repository, containing the source content for https://www.tigerdata.com/docs/. Tiger Data (formerly Timescale) is a modern Postgres data platform for time series, events, analytics, and vector search. The documentation is written in Markdown with custom components and is built separately in a private Gatsby-based repository.
8+
9+
## Development Workflow
10+
11+
### Link Checking
12+
Run link checker locally:
13+
```bash
14+
npx markdown-link-check <file.md> --config mlc_config.json
15+
```
16+
17+
### Linting Documentation
18+
The repository uses Vale for prose linting:
19+
```bash
20+
vale --glob='["_partials/**/*", "_troubleshooting/**/*", "about/**/*", "api/**/*", "getting-started/**/*", "mst/**/*", "navigation/**/*", "self-hosted/**/*", "tutorials/**/*", "use-timescale/**/*", "ai/**/*"]'
21+
```
22+
23+
Vale configuration is in `.vale.ini` and uses Vale + Google style guides.
24+
25+
### Markdown Linting
26+
Custom markdownlint rules are in `.vscode/markdownlint/` and configured via `.markdownlint.json` and `.markdownlint-cli2.jsonc`. These enforce documentation-specific patterns like:
27+
- Proper blank lines around `<Highlight>` blocks
28+
- Correct `<Procedure>` formatting
29+
- Proper frontmatter structure
30+
31+
### Creating Hyperfunction Documentation
32+
Use the template generator script for new two-step aggregate hyperfunction groups:
33+
```bash
34+
npm run template:hyperfunction
35+
```
36+
37+
This interactive script creates the directory structure and template files in `api/_hyperfunctions/`.
38+
39+
### Bulk Editing API Excerpts
40+
Helper scripts in `.helper-scripts/` for bulk frontmatter editing:
41+
```bash
42+
cd .helper-scripts
43+
./extract-excerpts.sh # Extract excerpts to single file
44+
# Edit extracted_excerpts.md
45+
./insert-excerpts.sh # Update original files
46+
```
47+
48+
## Architecture
49+
50+
### Navigation Hierarchy
51+
Navigation structure is governed by `page-index/page-index.js` files throughout the repository. The top-level `page-index/page-index.js` imports and combines all section-level navigation files.
52+
53+
**Page index structure:**
54+
- `href`: URL segment, must match markdown filename (without extension)
55+
- `title`: Page name in left TOC
56+
- `excerpt`: Short description (up to 100 chars) for page cards
57+
- `type`: Optional - `directory`, `placeholder`, `redirect-to-child-page`
58+
- `children`: Array of child pages
59+
- `pageComponents`: Display style for child pages - `['featured-cards']` or `['content-list']`
60+
- `index`: Specify alternative file if not `index.md`
61+
62+
Major documentation sections:
63+
- `getting-started/` - Getting started guides
64+
- `use-timescale/` - Product usage documentation
65+
- `api/` - API references and hyperfunctions
66+
- `tutorials/` - Step-by-step tutorials
67+
- `integrations/` - Integration guides
68+
- `self-hosted/` - Self-hosted deployment docs
69+
- `mst/` - Timescale MST documentation
70+
- `ai/` - AI and vector search features
71+
- `migrate/` - Migration guides
72+
- `about/` - Company and product information
73+
74+
### Content Organization
75+
76+
**Partials (`_partials/`):** Reusable content snippets. Create files starting with underscore. Import into target `.mdx` pages.
77+
78+
**Troubleshooting (`_troubleshooting/`):** Individual troubleshooting entries (not full pages). Each file contains frontmatter with:
79+
- `title`: Entry title
80+
- `section`: Must be `troubleshooting`
81+
- `products` and/or `topics`: Where entry appears (at least one required)
82+
- `errors`: Optional error display with `language` and `message`
83+
- `keywords`: Displayed at bottom, link to related pages
84+
- `tags`: Affect related page calculations (not displayed)
85+
86+
Troubleshooting pages are programmatically assembled during build. If page doesn't exist, add entry in page-index with `type: "placeholder"`.
87+
88+
**API Documentation (`api/`):** Function references include:
89+
- Function name with empty parentheses if takes arguments
90+
- Brief description with warnings
91+
- Usage samples demonstrating argument syntax
92+
- Argument table: `Name`, `Type`, `Default`, `Required`, `Description`
93+
- Return table: `Column`, `Type`, `Description`
94+
95+
Hyperfunctions are organized in `api/_hyperfunctions/` with subdirectories for two-step aggregation pattern functions.
96+
97+
### Custom Components
98+
99+
Available formatting beyond standard Markdown:
100+
- `<Procedure>`: Step-by-step instructions with bold step summaries
101+
- `<Highlight>`: Note/warning/caution blocks (use sparingly)
102+
- Tabs: Multi-option content display
103+
- Multi-tab code blocks
104+
- Tags
105+
106+
See `_partials/_formatting_examples.md` for syntax and examples.
107+
108+
### Variables
109+
Documentation uses variables for product names and UI elements with syntax `$VARIABLE_NAME`. Variables don't work in:
110+
- Page frontmatter
111+
- HTML tables and tabs
112+
113+
Internal links: use `:currentVersion:` instead of `latest` in URLs, no need for full domain `https://www.tigerdata.com/docs`.
114+
115+
## Style Guidelines
116+
117+
Follow [Google Developer Documentation Style Guide](https://developers.google.com/style) with exceptions:
118+
- Do NOT capitalize first word after a colon
119+
- Use code font (backticks) for UI elements instead of semi-bold
120+
121+
### SEO Optimization
122+
Include at top of pages:
123+
- `title`: Up to 60 characters, variation of page title
124+
- `excerpt`: Under 200 characters, variation of intro
125+
126+
Summarize paragraph content in first sentence. Include main keywords in meta tags, page title, first header, and intro.
127+
128+
## Deployment
129+
130+
### Preview Builds
131+
PRs from this repository automatically trigger preview builds (allow 10 minutes). Preview URLs follow pattern: `https://docs-dev.timescale.com/docs-<branch-name-with-hyphens>`
132+
133+
Build occurs in private `timescale/web-documentation` repository using Gatsby.
134+
135+
### Production
136+
Production deployment triggered by changes to appropriate branch.
137+
138+
## Git Workflow
139+
140+
Branch from `latest` for all changes. PRs target `latest` branch.
141+
142+
## Important Notes
143+
144+
- Only commit when explicitly asked by user
145+
- Never include secrets or sensitive information in documentation
146+
- Sign CLA on first PR (automated)
147+
- Large codebases can be excluded from indexing using `.warpindexingignore`
148+

0 commit comments

Comments
 (0)