Quick Summary
This repository houses the source code for a multi-brand documentation platform. It allows us to generate distinct, branded documentation websites from a single set of content and a shared codebase.
Key Features
- Single Source of Truth: All documentation content lives in the
content/directory and is shared across all brands. - Multi-Brand Support: The system generates separate sites for different brands (e.g., Acme, Beta) by applying brand-specific configurations and styles during the build process.
- Custom Build System: A custom script handles the injection of brand assets (logos, CSS) and configuration before generating the static site.
- Docusaurus: Built on top of Docusaurus, providing a modern, fast, and feature-rich documentation experience.
What is Docusaurus?
Docusaurus is a static-site generator (SSG) built by Meta. It is a library that you use to build your documentation website, as opposed to a platform like GitBook.
How it differs from GitBook
- Library vs. Platform: Docusaurus is open-source software that you run and host yourself (or on any static hosting provider). GitBook is a proprietary SaaS platform.
- Local Build: Because Docusaurus is a library, you can run it locally on your machine. This is what allows us to have a custom build process that generates multiple branded versions of the documentation from the same source.
- Customization: Docusaurus offers significantly more flexibility in terms of theming and functionality since you have full access to the code.
Customization
We have set up this project to allow easy customization for each brand.
Currently Available
- Branding Configuration: You can easily change the site title, tagline, URL, and logo via the
config.jsonfile for each brand. - Styling: Each brand can have its own
custom.cssfile to define color palettes (e.g., primary colors) and override default styles. - Content: Content is written in Markdown/MDX and shared across all brands.
What Could Be Added
Docusaurus is highly extensible. The following features could be added with minimal effort:
- Plugins: Add search, analytics, or other integrations.
- Custom Components: Create reusable React components to use within your Markdown content.
- Advanced Theming: "Swizzle" (wrap or replace) internal Docusaurus components to completely change the layout or behavior.
- Navigation: Customize the navbar and footer links further by extending the configuration schema.