Before diving into configuration, let's understand the fundamental concepts that make Vellocs work.
What is Vellocs?
Think of Vellocs as a documentation website builder. You write your documentation in simple text files (with Markdown), configure how your site looks and behaves through a single JSON file, and Vellocs generates a beautiful, fast website.
No Coding Required
You don't need to know how to code to use Vellocs. If you can write in Markdown and edit a JSON file, you're good to go!
How It Works
Here's the simple flow:
Write Content
You create .mdx files in the /docs directory. These are just text files with special formatting.
Configure Site
You edit the config.json file to tell Vellocs:
- What your site is called
- What colors to use
- How to organize your pages
- What features to enable
Vellocs Builds
Vellocs reads your content and configuration, then generates a complete website with:
- Navigation sidebar
- Search functionality
- Dark mode
- Mobile responsiveness
- And more!
Key Concepts
MDX Files
MDX is Markdown with superpowers. It's just regular text with some special syntax:
When you write in MDX, you get:
- Markdown syntax - Familiar formatting like
#for headings and**bold** - Components - Special blocks like
<Alert>,<Tabs>,<CodeBlock>that add interactive features - No HTML knowledge needed - Just use the components we provide
File Structure
Your Vellocs project has a simple structure:
- config.json
- package.json
- docs/ - Where all your documentation lives
- docs/config.json - The main configuration file
The config.json File
This is the most important file in your project. It's a configuration file written in JSON format.
What is JSON?
JSON is just a way to store information in a structured format. It looks like this:
Rules for JSON:
- Everything is in
{}curly braces - Properties have names in
"quotes" - Use
:after the property name - Separate properties with
,commas - Text values need
"quotes", numbers and true/false don't
Common JSON Mistakes
- Forgetting the comma between properties
- Using single quotes
'instead of double quotes" - Adding a comma after the last property (not allowed!)
Navigation Structure
One of the most important parts of config.json is the navigation. Think of it like a table of contents for your site.
Here's how it's organized:
Example:
This creates:
- A "Documentation" tab at the top
- A "Getting Started" section in the sidebar
- Two pages: Introduction and Installation
Important: Page paths in the pages array:
- Don't include
/docs/at the start - Don't include
.mdxat the end - Just use the folder path and filename
So /docs/guides/introduction.mdx becomes "guides/introduction"
How Pages are Created
When you add a file to /docs and reference it in config.json, Vellocs automatically:
- Reads the MDX file - Gets your content
- Parses the frontmatter - The metadata at the top of your file
- Generates a URL - Based on the file path
- Creates the page - With navigation, table of contents, and styling
- Adds it to the navigation - Based on your
config.jsonconfiguration
Page Frontmatter
Every MDX file should start with frontmatter - metadata about the page:
Available frontmatter fields:
title- Page title (shown in browser tab and navigation)description- Short description (used for SEO and previews)order- Optional number to control sort order within a group
Color System
Vellocs uses a design token system for colors. Instead of hardcoding colors everywhere, we use named tokens:
background- Main page backgroundforeground- Main text colorprimary- Your brand coloraccent- Links and highlightsmuted- Subtle text and backgroundsborder- Border colors
Why use tokens?
- Change one color in
config.jsonand it updates everywhere - Ensures visual consistency
- Makes dark mode work automatically
Static Site Generation
Vellocs uses static site generation (SSG). This means:
- When you build your site, Vellocs generates HTML files for every page
- These HTML files are complete, pre-rendered pages
- No server needed - just upload files to any host
- Pages load instantly because they're already built
Benefits:
- ⚡ Blazing fast - No server processing needed
- 🔒 Secure - No server to hack
- 💰 Free hosting - Can host on GitHub Pages, Vercel, Netlify for free
- 📈 Scales infinitely - Static files can handle any traffic
Development vs Production
Development mode is when you're working on your documentation locally:
In development mode:
- Changes appear instantly
- You see helpful error messages
- Hot reload updates the page as you edit
This is for writing and testing your documentation.
Next Steps
Now that you understand the basics, you're ready to:
Install Vellocs
Set up Vellocs on your computer
Configure Your Site
Learn how to edit config.json
Colors & Theming
Customize your site's appearance