Managing Documentation
This guide explains how to manage and maintain the Rhesis documentation site built with Nextra.
Documentation Management Learn how to run the documentation site, add new pages, configure search, and maintain the documentation effectively.
Quick Start
Running the Documentation
There are multiple ways to run the Rhesis documentation site. Choose the method that works best for your workflow.
Method 1: Using the CLI Tool (Recommended)
The easiest way to run the documentation is using our CLI tool from the project root:
This command will:
- Navigate to the docs directory automatically
- Install dependencies if needed
- Start the development server on port 3001
- Provide status feedback
Method 2: Manual Steps
If you prefer to run the documentation manually or need more control:
The documentation will be available at: http://localhost:3001
Method 3: Additional Commands
Verification
Once the server is running, you can verify it’s working correctly:
Troubleshooting
Port Conflicts:
Dependencies Issues:
Documentation URLs - Development: http://localhost:3001 - Production: After build, served on configured domain - Search: Available after build (Pagefind indexing)
Project Structure
The documentation is organized using Nextra’s file-based routing:
Adding New Pages
Creating a New Page
- Create a new
.mdxfile in the appropriate directory:
- Add content to the page:
Page Organization
Backend Docs
API documentation, architecture, and backend guides.
Frontend Docs
Component library, state management, and frontend guides.
Development
Setup guides, coding standards, and contribution guidelines.
User Guides
Tutorials, how-to guides, and user documentation.
API Reference
Complete API endpoint documentation.
Architecture
System design and architectural documentation.
Using Nextra Components
Callout Components
Nextra provides built-in callout components for highlighting information:
Grid Layouts
Use CSS Grid for responsive layouts:
Code Blocks
Use syntax highlighting for code examples:
Configuration
Theme Configuration
The theme.config.jsx file controls the documentation appearance:
MDX Components
Customize MDX rendering in mdx-components.js:
Search Functionality
Pagefind Search
Nextra 4 uses Pagefind for full-text search:
Search Note Search is only available after building the documentation. During development, you’ll see a message indicating that search requires a build.
Building for Search
Search Configuration
The search is automatically configured in package.json:
Development Workflow
Local Development
Building and Deploying
Continuous Integration
For automated documentation deployment:
Content Guidelines
Writing Style
Clear and Concise
Write in a clear, straightforward manner.
Consistent Formatting
Use consistent headings, lists, and code blocks.
Examples
Include practical examples and code snippets.
Progressive Disclosure
Start with basics, then add advanced topics.
Cross-references
Link to related pages and external resources.
Markdown Best Practices
Troubleshooting
Common Issues
Build Issues If you encounter build errors, check:
- All dependencies are installed
- MDX syntax is correct
- No circular imports in components
- Environment variables are set correctly
Search Not Working:
Styling Issues:
Performance Optimization
Image Optimization
Use optimized images and Next.js Image component.
Code Splitting
Nextra automatically handles code splitting.
Caching
Configure proper caching headers for static assets.
Maintenance
Regular Tasks
Maintenance Checklist - Update dependencies regularly - Review and update outdated content - Check for broken links - Optimize images and assets - Monitor search functionality
Content Updates
- Review existing content for accuracy
- Update outdated information and examples
- Add new features and API endpoints
- Remove deprecated content
- Improve navigation and cross-references
Version Management
Need Help? If you need assistance with documentation: - Check the Nextra documentation - Review existing pages for examples
- Ask questions in GitHub Discussions