π Docs Introduction
π Docs Introduction
The CodeHarborHub Docs feature gives you a powerful way to create and organize Markdown/MDX content in a structured, hierarchical formatβperfect for building technical documentation, courses, or developer guides.
Check the Docs Plugin API Reference
for a complete list of configuration options.
Your documentation is organized into four levels, from smallest to largest:
- Individual Pages β Basic
.md
or.mdx
files with front matter. - Sidebars β Define navigation and grouping of related docs.
- Versions β Manage multiple versions of your documentation.
- Plugin Instances β Run multiple independent docs sections in a single site.
This guide introduces each layer step-by-step: starting with
creating individual pages,
then building sidebars,
followed by versioning your content,
and finally using multiple docs plugin instances.
π Docs-only Modeβ
By default, a CodeHarborHub site includes Docs, Blog, and Pages.
A fresh installation looks like this:
example.com/ -> from `src/pages/index.js`
example.com/docs/intro -> from `docs/intro.md`
example.com/docs/tutorial-basics/... -> from `docs/tutorial-basics/...`
example.com/blog/2025/09/19/welcome -> from `blog/2025-09-19-welcome/index.md`
All docs are served under the docs/
subroute.
But what if you want docs as the homepage or youβre building a documentation-only site?
Enable Docs-Only Modeβ
In docusaurus.config.js
, set the docs plugin routeBasePath
to /
and (optionally) disable the blog:
export default {
// ...
presets: [
[
'@docusaurus/preset-classic',
{
docs: {
routeBasePath: '/', // Serve docs at the site root
/* other docs plugin options */
},
blog: false, // Optional: disable the blog
},
],
],
};
This moves your docs from:
https://example.com/docs/some-doc
to:
https://example.com/some-doc
Setting a Docs Homepageβ
Add front matter to the doc you want as the root page:
---
slug: /
---
Welcome to CodeHarborHub Docs!
This page is now the homepage.
Now your siteβs structure will look like:
example.com/ -> generated from `docs/intro.md`
example.com/tutorial-basics/... -> generated from `docs/tutorial-basics/...`