Getting Started with NexDocs
Welcome to NexDocs! This guide will walk you through setting up your first documentation project, configuring your environment, and deploying your docs to production.
Before you begin
Make sure you have Node.js 18+ and npm 9+ installed on your machine. You'll also need a NexDocs account — sign up for free.
Installation
Install the NexDocs CLI globally to get started. The CLI provides commands for initializing projects, local development, and deployment.
npm install -g @nexdocs/cli
Initialize a Project
Create a new documentation project using the nexdocs init command. This will set up the project structure with sensible defaults.
# Create a new project
nexdocs init my-docs
# Navigate to the project
cd my-docs
# Start the dev server
nexdocs dev
Configuration
Configure your project by editing the nexdocs.config.js file in your project root.
export default {
name: 'My Documentation',
description: 'Official docs for my project',
theme: {
primaryColor: '#6366f1',
darkMode: true,
font: 'Inter'
},
navigation: {
logo: './assets/logo.svg',
links: [
{ title: 'Docs', href: '/docs' },
{ title: 'API', href: '/api' },
{ title: 'Blog', href: '/blog' }
]
},
search: {
provider: 'algolia',
indexName: 'my-docs'
}
};
Important
Never commit your API keys to version control. Use environment variables or a .env file instead.
Deployment
Deploy your documentation to NexDocs Cloud with a single command. Your docs will be available at your-project.nexdocs.dev.
# Deploy to production
nexdocs deploy --production
# Deploy to staging
nexdocs deploy --preview
# Output:
# ✓ Build completed (2.1s)
# ✓ Uploaded 47 pages
# ✓ CDN invalidated
# ✓ Live at https://my-docs.nexdocs.dev
You're all set!
Your documentation is now live. Continue to the next section to learn about customization, or explore the API reference.
Next Steps
Was this page helpful?
Thanks for your feedback!