DaC
Docs-as-Code Reference Methodology Guide by Sulagna Sasmal
v1.0 ยท Stable DocForge Prototype โ†’ Blog Portfolio AI Tools โŒฅ GitHub
Getting Started

Docs-as-Code Reference Guide

This is a comprehensive methodology reference for Docs-as-Code โ€” the practice of applying software engineering discipline to documentation. It covers concepts, workflows, tooling, and architecture decisions. For the interactive prototype that demonstrates these principles in action, see DocForge โ†’

🔗
DocForge Ecosystem

This Reference Guide is one part of a connected documentation engineering case study. DocForge Platform is the product landing page explaining why it was built. DocForge Demo is the interactive prototype with six live modules. And "No Tool Covers the Full Docs Pipeline" is the build narrative that started it all.

What Is This Platform?

The Docs-as-Code Platform is a purpose-built system for teams who want their documentation to behave like their code. Instead of managing docs in shared Word files, disconnected wikis, or manual CMS tools, this platform treats every document as source code โ€” stored in Git, reviewed via pull requests, tested through a CI/CD pipeline, and deployed automatically to multiple output formats.

It was designed and built by Sulagna Sasmal, a Technical Writer and Documentation Engineer specializing in fintech, compliance platforms, and developer-facing APIs. The platform reflects how documentation should work in regulated, engineering-led organizations.

โ„น
Docs-as-Code defined

Docs-as-Code means applying the same tools, workflows, and standards used for software development โ€” Git, code review, CI/CD, automated testing โ€” to the creation and maintenance of documentation.

Purpose & Goals

Documentation fails organizations for predictable reasons: it goes out of date immediately after release, no one knows what changed or when, quality is inconsistent across authors, and publishing is a slow manual process. This platform was built to solve each of those problems systematically.

  • Single source of truth: one Markdown source compiles to every output format. No copy-paste drift between the web portal, PDF, and API spec.
  • Full audit history: every change is tracked in Git with author, timestamp, and commit message. Critical for regulated industries like financial services and healthcare.
  • Automated quality gates: style linting, broken-link detection, and structural validation run on every commit before anything reaches readers.
  • Continuous publishing: docs go live the moment a pull request merges. No manual export steps, no publishing queues, no staging servers to manage.
  • Developer-native workflow: writers work in the same tools engineers use. Docs ship alongside the feature, not weeks after.

Who Is This For?

RoleHow this platform helps
Technical WritersWrite in Markdown with full tooling support, use Git branches for drafts, get automated style feedback before review
Documentation EngineersManage the build pipeline, define style rules, configure output targets, monitor doc health via the dashboard
Development TeamsReview and approve doc changes via pull requests, same as code โ€” docs ship with the feature
Compliance TeamsQuery the tamper-evident Git history for any documentation change, exportable as a signed audit report
Product ManagersTrack documentation coverage against feature releases, view build health and content metrics in the dashboard

Platform at a Glance

The platform consists of five pipeline stages and six management modules. The pipeline is the automated process that converts source files into published documentation. The modules are the interactive tools for managing that process.

01
โœ๏ธ Write
Markdown, MDX, OpenAPI
โ€บ
02
๐Ÿ”€ Review
Git, Pull Requests
โ€บ
03
โš™๏ธ Build
MkDocs, Sphinx, Hugo
โ€บ
04
๐Ÿ” Validate
Vale, link checks
โ€บ
05
๐Ÿš€ Publish
GitHub Pages, Netlify

Explore the Platform

๐Ÿ“–
What is Docs-as-Code?
Understand the methodology, its five principles, and why it matters.
โšก
Quick Start Guide
Get your first documentation pipeline running in under 10 minutes.
โš™๏ธ
The Docs Pipeline
Deep dive into each of the five stages from write to publish.
โ—ซ
Platform Modules
Explore the dashboard, editor, content map, linter, and more.
Getting Started

What Is Docs-as-Code?

Docs-as-Code is a documentation methodology that applies software engineering discipline โ€” version control, peer review, automated testing, continuous delivery โ€” to how documentation is written, managed, and published. It is not a tool. It is a way of working.

The Core Idea

Software teams have spent decades building practices that make code reliable, traceable, and maintainable: every change is tracked in Git, reviewed by peers, tested automatically before it ships, and deployed with a repeatable process. Documentation teams have largely not had access to those same practices โ€” until Docs-as-Code.

The insight is straightforward: documentation is a deliverable that belongs to the same codebase as the software it describes. When docs live in a Git repository, written in plain text formats like Markdown, they gain all the same properties as the code they document: full history, structured review, automated quality checks, and continuous deployment.

The Five Principles

  1. 1
    Plain text source

    Documentation is written in a lightweight markup language โ€” Markdown, MDX, or reStructuredText โ€” not in proprietary formats. Plain text is readable by humans, diffable by tools, and not locked to any vendor.

  2. 2
    Version controlled in Git

    Every change to every document is committed to a Git repository. The full history of who changed what, when, and why is permanently available. Branches enable parallel drafts without overwriting each other.

  3. 3
    Reviewed like code

    Documentation changes go through pull requests. Subject-matter experts, editors, and engineers review the diff before anything merges. Review comments are visible, tracked, and resolved โ€” creating a transparent editorial process.

  4. 4
    Tested before publishing

    A CI pipeline runs automatically on every change. It checks for broken links, style guide violations, missing frontmatter, schema errors in OpenAPI specs, and any other quality rule the team defines. The build fails if standards are not met.

  5. 5
    Deployed continuously

    When a change merges, the documentation site rebuilds and deploys automatically. The published site is always in sync with the repository. There is no manual publish step, no FTP uploads, no stale cached versions.

Traditional Docs vs Docs-as-Code

AreaTraditional DocumentationDocs-as-Code
Source formatWord, PDF, wiki markupMarkdown / MDX / OpenAPI
Version controlFile naming (v2_FINAL.docx)Git: full history, branches, tags
Review processEmail chains, tracked changesPull requests with inline comments
Quality checksManual proofreadingAutomated lint, link checks, CI
PublishingManual export and uploadAutomatic on merge
Audit trailNone or fragmentedComplete: every commit is signed
Multi-format outputMaintain separate files per formatOne source โ†’ HTML, PDF, JSON, search index
CollaborationOne person edits at a timeParallel branches, no conflicts until merge

The Toolchain

Docs-as-Code relies on a composable toolchain. You choose the tools that fit your stack โ€” the methodology works with any combination.

StageTools
WritingVS Code, any text editor, or this platform's Live Editor
Version controlGit, GitHub, GitLab, Bitbucket
BuildMkDocs, Sphinx, Hugo, Docusaurus, Eleventy
LintingVale (style), markdownlint (structure), lychee (links)
CI/CDGitHub Actions, GitLab CI, CircleCI, Jenkins
HostingGitHub Pages, Netlify, Vercel, AWS S3 + CloudFront
โœฆ
Why it matters for regulated industries

In financial services, healthcare, and other regulated domains, documentation is not just a developer convenience โ€” it is evidence. A Git repository provides a tamper-evident, timestamped record of every change to every document. That record can be exported as a compliance audit report at any time.

Getting Started

Quick Start Guide

This guide walks you through setting up a Docs-as-Code pipeline from scratch โ€” from creating your repository to seeing your documentation go live on GitHub Pages. Estimated time: 15 minutes.

Prerequisites

ToolVersionPurpose
git2.x+Version control for your docs source
python3.10+Required by MkDocs build engine
piplatestInstalls MkDocs and plugins
GitHub accountโ€”Repository hosting and GitHub Pages deployment
Vale CLI3.x+Style linting (optional for quick start)

Setup Steps

  1. 1
    Create and clone your repository

    Create a new public repository on GitHub, then clone it locally. This is where all your documentation source files will live.

bash
git clone https://github.com/your-username/your-docs-repo.git
cd your-docs-repo
  1. 2
    Install MkDocs and the Material theme

    MkDocs is the build engine. The Material theme provides a professional documentation portal layout out of the box.

bash
pip install mkdocs mkdocs-material
  1. 3
    Initialize the project structure

    Run mkdocs new . to scaffold the config file and docs/ directory. Your first document is created automatically.

bash โ†’ project layout
mkdocs new .

# Output structure:
your-docs-repo/
โ”œโ”€โ”€ mkdocs.yml          # site configuration
โ””โ”€โ”€ docs/
    โ””โ”€โ”€ index.md        # your first page
  1. 4
    Configure your site

    Edit mkdocs.yml to set your site name, theme, and navigation. This is the single configuration file that controls the entire build.

mkdocs.yml
site_name: My Documentation
site_url: https://your-username.github.io/your-docs-repo/
theme:
  name: material
  palette:
    scheme: slate
    primary: amber
nav:
  - Home: index.md
  - Getting Started: getting-started.md
  1. 5
    Preview locally, commit, and deploy

    Run the local server to preview your site, then commit and push. GitHub Actions will build and deploy to GitHub Pages automatically.

bash
# Preview locally on http://127.0.0.1:8000
mkdocs serve

# Commit and push
git add .
git commit -m "docs: initialize documentation site"
git push origin main

# Deploy to GitHub Pages manually (or via Actions)
mkdocs gh-deploy
โœฆ
Automate with GitHub Actions

See the CI/CD Integration guide to set up a GitHub Actions workflow that builds and deploys automatically on every push to main.

Core Concepts

The Docs Pipeline

The documentation pipeline is the automated workflow that takes a Markdown source file from a writer's editor to a published, validated, multi-format documentation site. It has five stages. Each stage is a quality gate โ€” if a stage fails, the change does not proceed.

Stage 1: Write

Authors write documentation in Markdown (or MDX for React-based portals, or YAML/JSON for OpenAPI specs). The source format is chosen for portability: it can be read by any text editor, diffed by any version control tool, and compiled by any documentation build engine.

Good documentation source files follow a consistent structure: a frontmatter block (title, description, last reviewed date), then the content using headings, paragraphs, code blocks, and tables. The platform's Live Editor provides a split-pane environment to write and preview simultaneously.

Example: docs/api/authentication.md
---
title: Authentication
description: How to authenticate API requests using Bearer tokens
last_reviewed: 2026-02-01
---

# Authentication

All API requests must include a valid Bearer token in the `Authorization` header...

Stage 2: Commit & Review

Once the author is satisfied with a draft, they commit the change to a feature branch in Git and open a pull request. The pull request is the review interface: it shows exactly what changed (a readable diff of Markdown), allows inline comments on specific lines, and tracks when comments are resolved.

This stage enforces that no documentation reaches readers without being seen by at least one other person โ€” whether a subject-matter expert, a peer writer, or an engineer who built the feature. The review history becomes a permanent record of editorial decisions.

Stage 3: Build

When the pull request is opened, the CI pipeline triggers a build. The build engine (MkDocs, Sphinx, or Hugo depending on configuration) compiles all Markdown source files into the configured output formats. A successful build confirms that the site structure is valid and all referenced files exist.

Stage 4: Validate

Validation runs in parallel with the build. The style linter (Vale) checks every changed file against the configured rule set. The link checker scans all internal and external links. Schema validators check OpenAPI specs. If any check fails, the CI run is marked failed and the pull request cannot merge until the issue is resolved.

โš 
Validation is non-optional

Branch protection rules should require all CI checks to pass before a pull request can merge. This is what makes the pipeline a quality gate, not just a suggestion.

Stage 5: Publish

When the pull request merges, the build and deploy workflow runs against the main branch. The compiled HTML site, PDF export, OpenAPI JSON, and search index are uploaded to the configured hosting target. The live site updates within minutes of the merge, with no manual intervention required.

Core Concepts

Version Control for Documentation

Storing documentation in Git gives every team member a complete, auditable history of every change ever made. This page explains the branching strategy, commit conventions, and pull request process used in this platform.

Branching Strategy

BranchPurposeMerge target
mainAlways-publishable source of truth. Protected: no direct commits.โ€”
docs/feature-nameNew content or significant updates to existing contentmain
docs/fix-*Typo fixes, broken link repairs, minor correctionsmain
release/vX.YVersioned documentation snapshot for a product releasemain

Commit Conventions

Consistent commit messages make the Git log readable and enable automated changelog generation. This platform follows a documentation-specific adaptation of Conventional Commits:

commit message format
docs(scope): short description of the change

# Examples:
docs(api): add rate limiting section to authentication page
docs(getting-started): fix broken link to quickstart guide
docs(compliance): update GDPR data residency table for EU region
fix(linting): resolve Vale rule violation in webhook reference
chore(config): update mkdocs.yml nav structure for v1.1

Pull Request Process

  1. Author opens a PR from their feature branch against main
  2. CI runs automatically: style lint, link check, build
  3. At least one reviewer approves the content changes
  4. All CI checks pass and review comments are resolved
  5. Author or reviewer merges. Deployment runs automatically
Core Concepts

CI/CD Integration

GitHub Actions powers the build, validate, and deploy stages of the pipeline. Every push to a pull request branch triggers validation. Every merge to main triggers a full build and deployment.

GitHub Actions Workflow

The following workflow file covers the full pipeline โ€” linting, building, and deploying to GitHub Pages.

.github/workflows/docs.yml
name: Docs CI/CD

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  lint-and-build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: '3.12'

      - name: Install dependencies
        run: pip install mkdocs mkdocs-material

      - name: Vale style lint
        uses: errata-ai/vale-action@v2
        with:
          files: docs/

      - name: Build documentation
        run: mkdocs build --strict

      - name: Deploy to GitHub Pages
        if: github.ref == 'refs/heads/main'
        run: mkdocs gh-deploy --force

Build Triggers

EventJobs runDeploys?
Push to PR branchLint, build (strict mode)No
Merge to mainLint, build, deployYes โ†’ GitHub Pages
Manual triggerFull pipelineYes
Core Concepts

Style Linting with Vale

Vale is a syntax-aware prose linter that enforces your documentation style guide automatically. It runs in CI on every pull request, catching inconsistencies before they reach readers โ€” passive voice, banned terms, incorrect product names, and readability issues.

Configuration

.vale.ini
StylesPath = .vale/styles
MinAlertLevel = suggestion

[*.md]
BasedOnStyles = Vale, Google, DaC
DaC.PassiveVoice = warning
DaC.Terminology = error
Google.Headings = suggestion

Rule Categories

LevelBehaviorExample rules
errorFails the CI build: must fix before mergeWrong product name, banned term, broken heading hierarchy
warningReported in CI: should fix, does not blockPassive voice, "simply" / "just", future tense for features
suggestionAdvisory: fix when practicalSentence length, heading capitalization, Oxford comma

Common Violations & Fixes

Passive voice: warning
# โœ— Before
The request is authenticated by the server using a Bearer token.

# โœ“ After
The server authenticates the request using a Bearer token.
Banned terminology: error
# โœ— Before โ€” "whitelist" is a banned term
Add your domain to the whitelist.

# โœ“ After
Add your domain to the allowlist.
Core Concepts

Multi-Format Output

A single Markdown source compiles into multiple output formats simultaneously. You write once, and the build pipeline produces an HTML documentation site, a PDF manual, an OpenAPI JSON specification, and a search index โ€” all from the same source files.

Output Formats

FormatUse caseTool
HTML sitePrimary web documentation portal, hosted on GitHub Pages or NetlifyMkDocs / Material theme
PDF manualOffline distribution, print, enterprise deliveryWeasyPrint or mkdocs-with-pdf
OpenAPI JSONMachine-readable API spec for Postman, Swagger UI, SDK generationInline YAML โ†’ JSON conversion
Search indexClient-side full-text search, feeds the built-in portal searchMkDocs search plugin

Configuring Output Targets

mkdocs.yml: output plugins
plugins:
  - search
  - with-pdf:
      author: Sulagna Sasmal
      cover_title: Platform Documentation
      output_path: pdf/platform-docs.pdf
  - tags
โ„น
Single source principle

Never maintain separate files for different output formats. If your PDF manual and HTML site have diverged, you have two sources of truth โ€” which means you have none. The platform enforces single-source by generating all formats from the same pipeline run.

Platform Modules

Dashboard

The Dashboard is the command center for your documentation project. It gives an at-a-glance view of build health, content coverage, contributor activity, and recent pipeline runs.

Key Metrics

MetricWhat it tells you
Build StatusPass / fail of the last CI run, with link to logs
Content CoveragePercentage of API endpoints, features, or topics with documentation
Lint ScoreNumber of open style warnings and errors across all files
Active ContributorsAuthors with commits in the last 30 days
Last PublishedTimestamp of the most recent successful deploy
Platform Modules

Live Editor

The Live Editor is a split-pane Markdown authoring environment with real-time HTML preview and inline Vale linting. Authors can write, preview, and fix style issues without leaving the browser.

Features

  • Split-pane view: Markdown source on the left, rendered HTML preview on the right, updated on every keystroke
  • Frontmatter validation: highlights missing or malformed frontmatter fields before saving
  • Inline lint markers: Vale violations are underlined in the editor with hover explanations
  • Keyboard shortcuts: standard editor shortcuts for bold, italic, code, links, and headings
  • Export: download the current file as .md or copy the rendered HTML
โœฆ
Use the editor for drafts

The Live Editor is best used for initial drafting and quick edits. For complex multi-file changes, work in your local editor with the Vale VS Code extension, then commit through your normal Git workflow.

Platform Modules

Content Map

The Content Map is a visual representation of your entire documentation structure โ€” every page, its position in the hierarchy, its status, and its relationships to other pages.

What It Shows

  • Doc tree: full navigation hierarchy rendered as an interactive graph
  • Orphaned pages: pages that exist in the docs/ folder but are not referenced in the nav
  • Broken cross-references: internal links that point to pages that do not exist
  • Coverage gaps: sections of the nav that have placeholder stubs rather than full content
  • Page metadata: last edited date, word count, lint status per page
Platform Modules

Style Linter Module

The Style Linter module provides an interactive view of all active Vale rules, current violations across the codebase, and the ability to run a lint pass against any file on demand.

Panel Layout

  • Rule browser: lists all active rules with their severity, description, and example violations
  • Violations panel: all current lint issues grouped by file, filterable by severity
  • Run on file: paste or select a file path and run Vale against it immediately
  • Suppression manager: view and manage inline vale off / vale on suppressions across the codebase

For the full Vale configuration reference, see the Style Linting core concepts page.

Platform Modules

Build Outputs

The Build Outputs module shows every artifact produced by the last successful pipeline run โ€” with a preview, file size, and direct download or deploy link for each format.

Available Outputs

OutputDescriptionTypical size
HTML SiteFull static site ready for hosting. Includes search index and all assets.2โ€“15 MB
PDF ManualPrint-ready PDF with auto ToC, page numbers, and chapter breaks.1โ€“8 MB
OpenAPI JSONMachine-readable API spec for Postman, Swagger UI, and SDK generation.50โ€“500 KB
Search IndexJSON index file for client-side full-text search.100โ€“800 KB
Platform Modules

Configuration Module

The Configuration module provides a visual editor for the platform's docs-center.config.yml file โ€” the single source of truth for site settings, navigation, theme, lint rules, and deploy targets.

Configuration Sections

  • Site metadata: name, URL, description, author, copyright
  • Navigation: page hierarchy, external links, nav sections
  • Theme: color palette, logo, font, feature flags
  • Lint rules: active Vale style sets, severity overrides, suppression list
  • Build plugins: PDF export, search, tags, social cards
  • Deploy targets: GitHub Pages, Netlify site ID, S3 bucket

For the full configuration schema reference, see the Config Schema reference page.

Reference

Configuration Schema

Complete reference for all fields in docs-center.config.yml. All fields are optional unless marked required.

Top-Level Fields

FieldTypeDescription
site_name requiredstringDisplay name of the documentation site
site_urlstringCanonical URL: used in sitemap and social meta tags
site_descriptionstringShort description for SEO and portal header
site_authorstringAuthor name for PDF cover and page meta
docs_dirstringDirectory containing Markdown source files. Default: docs/
site_dirstringDirectory for compiled output. Default: site/

Theme

docs-center.config.yml: theme section
theme:
  name: material
  palette:
    scheme: slate          # dark mode
    primary: amber
    accent: amber
  font:
    text: Inter
    code: JetBrains Mono
  features:
    - navigation.tabs
    - navigation.top
    - content.code.copy
    - search.highlight
Reference

Changelog

All notable changes to the Docs-as-Code Platform are documented here. This project follows Keep a Changelog and Semantic Versioning.

v1.0.0: 2026-02-28 Stable

Added

  • Initial release of the Docs-as-Code Platform documentation portal
  • Getting Started section: Introduction, What is Docs-as-Code, Quick Start Guide
  • Core Concepts: Pipeline, Version Control, CI/CD Integration, Style Linting, Multi-Format Output
  • Platform Module guides: Dashboard, Live Editor, Content Map, Style Linter, Build Outputs, Configuration
  • Reference: Configuration Schema, Changelog
  • GitHub Actions workflow example for full CI/CD pipeline
  • Vale configuration examples with rule severity table
  • Before/after examples for common lint violations
  • Branching strategy and commit convention reference

Platform

  • Dark amber theme consistent with VaultPay and CaseForge portfolio sites
  • Fully interactive single-page navigation with dynamic table of contents
  • Responsive layout: sidebar and TOC hide on smaller screens
  • Hosted on GitHub Pages via SulagnaSasmal/docs-as-code-portal