Robindoc can be considered to consist of several parts:
- Documentation Structure (more about documentation structure);
- Robindoc Initialization (more about initialization);
- Page Markup and Configuration (more about customization);
- Documentation Markdown Files (more about writing MD).
One of the main advantages of Robindoc is that documentation files can reside in any source — whether they are files outside the current directory or a remote git repository (more about sources on the "Data Source" page).
Robindoc’s main approach is that you don’t adjust the location of markdown files for Robindoc; instead, Robindoc builds the site from your markdown files. In other words, you place files so that they can be read in GitHub, and Robindoc serves as a convenient interface.
However, when using the automatic mode for generating the structure, the documentation file structure should match the desired structure on the site. In manual mode, you can organize the documentation files as you wish, but it is still recommended to reflect the site’s structure.
After initialization, you will receive Sidebar, Page, getPages, getMeta, and getPageContent. Read more on the Initialization page.
Global elements - RobinProvider
, Header
, Footer
, and Main
- should ideally be placed above all pages and reused across all.
import { RobinProvider, Header, Footer, Main } from "robindoc";
import "robindoc/lib/styles.css";
export const Layout = ({ children }) => {
return (
<RobinProvider>
<Header logo={<Logo />} />
<Main>{children}</Main>
<Footer copyright="© 2024 All rights reserved" />
</RobinProvider>
);
};
Sidebar and Page are used for each page.
import { Page, Sidebar } from "./robindoc";
export const Page = () => {
return (
<>
<Sidebar pathname="/docs" />
<Page pathname="/docs" />
</>
);
};
For more details on using the components, refer to their respective pages.
You will also need to configure metadata insertion on pages, search, and possibly dynamic page generation. The specific markup of Robindoc components and configuration may vary depending on the chosen framework. Here are some ready-made solutions: