Skip to content

Commit eab3ce9

Browse files
authored
docs: Restructure documentation to improve organization (#9578)
1 parent 93027d8 commit eab3ce9

File tree

250 files changed

+1419
-2224
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

250 files changed

+1419
-2224
lines changed

docs/.claude/commands/move-page.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Move documentation page
2+
3+
I need to move a documentation page from its current location to a new one within our documentation site. Please help me with the full process including:
4+
5+
1. Moving the source file to the destination directory:
6+
- If there's a file with the same name in the destination directory, ask for the new name and rename the source file before moving it
7+
- Use the `mv` command to move the file to the new location
8+
9+
2. Updating relevant _meta.js files to maintain proper navigation:
10+
- Add the page to the destination directory's _meta.js file
11+
- Remove the page from the source directory's _meta.js file
12+
- If the source _meta.js file becomes empty (just contains `module.exports = {}`)
13+
- Delete it
14+
- Delete the directory where that _meta.js file was from the _meta.js file in its parent directory
15+
16+
3. Finding and updating all internal references/links to the moved page:
17+
- Search for references to the old URL path in all files
18+
- Pay special attention to link references at the bottom of files
19+
- Check plugins that might construct URLs programmatically
20+
21+
4. Adding a redirect from the old URL to the new one:
22+
- Add a new entry at the top of the redirects.json file
23+
- Format should follow existing entries with "permanent": true
24+
25+
Before starting, ask for:
26+
- Source page path (in URL format, e.g., /reference/configuration/environment-variables)
27+
- Destination page path (in URL format, e.g., /product/configuration/reference/environment-variables)

docs/CLAUDE.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Repository Overview
6+
7+
This repository contains the documentation site for Cube, a semantic layer for building data applications. The documentation is built using Next.js with the Nextra documentation theme and MDX for content authoring.
8+
9+
## Project Structure
10+
11+
- `/pages`: Contains all the documentation content in MDX format
12+
- `/components`: React components used throughout the documentation site
13+
- `/common`: General UI components like buttons, logos, etc.
14+
- `/layouts`: Page layout components
15+
- `/mdx`: Custom components for use within MDX content
16+
- `/overrides`: Components that override Nextra defaults
17+
- `/public`: Static assets (images, icons)
18+
- `/styles`: Global CSS styles
19+
- `/scripts`: Utility scripts for managing content
20+
21+
## Development Commands
22+
23+
```bash
24+
# Start development server
25+
npm run dev
26+
27+
# Build for production
28+
npm run build
29+
30+
# Start production server
31+
npm run start
32+
33+
# Utility commands for content management
34+
npm run create-redirects # Create redirect entries
35+
npm run migrate-content # Run content migration scripts
36+
npm run update-links # Update links in content files
37+
```
38+
39+
## Technology Stack
40+
41+
- **Framework**: Next.js with Nextra theme for documentation
42+
- **Content**: MDX (Markdown with JSX)
43+
- **Styling**: CSS/SCSS modules with Tailwind CSS
44+
- **Deployment**: Vercel
45+
46+
## Content Organization
47+
48+
The documentation follows a hierarchical structure:
49+
50+
1. Main sections are defined in `/pages/_meta.js`
51+
2. Each section has its own `_meta.js` file that defines the order and titles of pages
52+
3. Content is written in MDX files with frontmatter
53+
54+
## Component Usage in MDX
55+
56+
The documentation uses custom MDX components for specialized content presentation:
57+
58+
- `<AlertBox>` - For highlighting important information
59+
- `<CodeTabs>` - For code examples in multiple languages
60+
- `<Grid>` and `<GridItem>` - For creating responsive grids
61+
- `<YouTubeVideo>` - For embedding videos
62+
- `<Screenshot>` - For displaying screenshots
63+
64+
## Best Practices
65+
66+
1. **MDX Content**:
67+
- Use the appropriate custom components for different content types
68+
- Follow the existing section structure when adding new pages
69+
- Include proper frontmatter with title and description
70+
71+
2. **Component Development**:
72+
- Use CSS/SCSS modules for component styling
73+
- Follow the existing folder structure for new components
74+
- Export components through index files for cleaner imports
75+
76+
3. **Navigation**:
77+
- Update `_meta.js` files when adding new pages to ensure proper navigation
78+
79+
## Deployment
80+
81+
The site is deployed to Vercel. The deployment process is automated via GitHub integration.

docs/pages/_meta.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,4 @@ module.exports = {
3131
type: "page",
3232
title: "Documentation",
3333
},
34-
35-
reference: {
36-
type: "page",
37-
title: "Reference",
38-
},
39-
40-
guides: {
41-
type: "page",
42-
title: "Guides",
43-
},
4434
};

docs/pages/guides/_meta.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

docs/pages/guides/recipes.mdx

Lines changed: 0 additions & 86 deletions
This file was deleted.

docs/pages/guides/recipes/_meta.js

Lines changed: 0 additions & 13 deletions
This file was deleted.

docs/pages/guides/recipes/access-control/_meta.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)