This document provides recommendations and standards for implementing interactive documentation solutions for Bayat projects.
Tool | Best For | Features | Complexity |
---|---|---|---|
Docusaurus | Comprehensive developer portals | React integration, versioning, search, plugins | Medium |
MkDocs | Lightweight documentation | Simple, Markdown-based, Material theme | Low |
VuePress | Vue.js projects | Vue integration, customizable themes | Medium |
GitBook | Team documentation | Collaborative editing, clean UI | Low |
Sphinx | API documentation | Extensive extensions, code-doc integration | High |
For most Bayat projects, Docusaurus is the recommended solution. Implementation should follow these standards:
docs/
├── intro.md # Introduction page
├── getting-started.md # Getting started guide
├── category/ # Category directory
│ ├── _category_.json # Category metadata
│ ├── doc1.md # Document in category
│ └── doc2.md # Another document in category
├── another-category/
│ └── ...
static/ # Static assets
├── img/ # Images
└── diagrams/ # Architecture diagrams
The docusaurus.config.js
file should include:
module.exports = {
title: 'Project Name Documentation',
tagline: 'Clear, concise, complete documentation',
url: 'https://docs.example.com',
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/favicon.ico',
organizationName: 'bayat',
projectName: 'project-name',
presets: [
[
'@docusaurus/preset-classic',
{
docs: {
sidebarPath: require.resolve('./sidebars.js'),
editUrl: 'https://github.com/bayat/project-name/edit/main/',
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
},
],
],
themeConfig: {
navbar: {
title: 'Project Name',
logo: {
alt: 'Bayat Logo',
src: 'img/logo.svg',
},
items: [
{
type: 'doc',
docId: 'intro',
position: 'left',
label: 'Documentation',
},
{
href: 'https://github.com/bayat/project-name',
label: 'GitHub',
position: 'right',
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'Docs',
items: [
{
label: 'Introduction',
to: '/docs/intro',
},
{
label: 'Getting Started',
to: '/docs/getting-started',
},
],
},
{
title: 'Community',
items: [
{
label: 'Slack',
href: 'https://slack.bayat.com',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} Bayat, Inc.`,
},
},
};
For simpler project documentation, MkDocs with Material theme is recommended:
docs/
├── index.md # Home page
├── getting-started.md # Getting started guide
├── user-guide/ # User guide directory
│ ├── overview.md # Overview document
│ └── features.md # Features document
├── api/ # API documentation
│ └── ...
The mkdocs.yml
file should include:
site_name: Project Name Documentation
site_url: https://docs.example.com
repo_url: https://github.com/bayat/project-name
edit_uri: edit/main/docs/
theme:
name: material
palette:
primary: indigo
accent: indigo
features:
- navigation.tabs
- navigation.instant
- navigation.tracking
- navigation.top
- search.suggest
- search.highlight
markdown_extensions:
- admonition
- pymdownx.details
- pymdownx.superfences
- pymdownx.tabbed
- pymdownx.emoji
- attr_list
- md_in_html
plugins:
- search
- minify:
minify_html: true
nav:
- Home: index.md
- Getting Started: getting-started.md
- User Guide:
- Overview: user-guide/overview.md
- Features: user-guide/features.md
- API:
- Overview: api/index.md
Documentation should be deployed automatically using CI/CD pipelines:
- For GitHub repositories, use GitHub Actions
- For GitLab repositories, use GitLab CI/CD
- Deploy to GitHub Pages, GitLab Pages, or Netlify
name: Deploy Documentation
on:
push:
branches: [main]
paths:
- 'docs/**'
- 'docusaurus.config.js'
- '.github/workflows/deploy-docs.yml'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: npm
- name: Install dependencies
run: npm ci
- name: Build website
run: npm run build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build
If you're considering migrating existing documentation to an interactive solution:
- Inventory: Catalog all existing documentation
- Structure: Plan the new information architecture
- Migrate: Convert content to Markdown format
- Enhance: Add cross-references, search, and navigation
- Test: Verify all links and content
- Deploy: Set up CI/CD for automatic deployment
- Redirect: Set up redirects from old documentation
Interactive documentation significantly improves the developer experience, making it easier to find, use, and contribute to documentation. Choose the appropriate tool based on your project's needs and follow the implementation standards outlined in this document.