When I took data structures in college, my professor explained how linked lists and trees worked and how pointers held them together. Years later, when I was preparing to teach my own data structures course, I thought about what those lectures had left me without. I could explain how a linked list worked on paper. What I needed to see was how to make one work in C++.
When I taught my own data structures class, I wrote C++ code live, explaining each line as I went. When I inserted a node into a linked list, students could see exactly which pointers changed and why. The difference mattered. You can follow a lecture on linked lists and still have no idea what to type when it’s time to build one.
The same goes for technical documentation. If readers understand the idea but still can’t put it into practice, the explanation has only done half its job. A working example lets them follow the steps, see the result, and try it for themselves.
My first article explained why documentation should live alongside the code it describes. You can find it here. Docs as Code: Why Documentation Should Live with Your Code
To see what that looks like in practice, let’s follow a single documentation update through a typical workday.
Imagine you're a technical writer working on a software development team. A developer has just changed part of the application's configuration process. The existing documentation is no longer accurate, and someone needs to update it before the next release.
In a traditional documentation environment, you might open a Word document, make the necessary changes, send it out for review, and eventually publish a new version. In a DocsAsCode environment, the process is different. You work with source files, use Git to track changes, collaborate through a shared repository, and rely on automated tools to build and publish the finished documentation.
But what does that actually look like during a normal working day? Let's follow a documentation update from beginning to end.
9:00 a.m. — Finding the documentation
You start your day by opening the project's repository on GitHub.
A repository, commonly called a repo, is where a project's files are stored and managed using Git. It might contain the application's source code, configuration files, tests, and documentation. Some projects keep documentation in a separate repository, while others store it alongside the application code.
For this example, the documentation lives in the application repository. You find a directory containing the documentation source files:
my-project/ │ ├── src/ │ ├── application.cpp │ └── configuration.cpp │ ├── docs/ │ ├── index.md │ ├── installation.md │ ├── configuration.md │ └── troubleshooting.md │ ├── Doxyfile └── README.md The files ending in .md are Markdown files. Markdown is a lightweight markup language that lets you write formatted content using ordinary text and simple symbols. You also notice a file named Doxyfile. This is the configuration file used by Doxygen, a documentation generation tool commonly associated with software projects written in languages such as C and C++.
Doxygen can extract documentation from specially formatted comments in source code. It can also process separate documentation files written in supported formats, including Markdown. This gives teams some flexibility in how they organize their documentation. API descriptions can live close to the code they describe, while installation guides, user instructions, and other standalone material can live in separate files.
The important point is that you're working with documentation source files, not editing a finished Word document or content stored inside a proprietary documentation application.
9:30 a.m. — Making the update
You locate the configuration documentation and make the necessary correction in the appropriate source file. Depending on the project, that might mean editing a Markdown file in an editor such as Visual Studio Code or updating a documentation comment directly in a source-code file.
For example, a developer might document a function like this:
/** * @brief Loads the application configuration. * * Reads the configuration settings and applies * the appropriate default values. * * @param filename Path to the configuration file. * @return True if the configuration loads successfully. */ bool loadConfiguration(const std::string& filename); The comment isn't simply an explanation for someone reading the code. Doxygen recognizes its structure and uses the information to generate documentation. Tags such as @brief, @param, and @return tell Doxygen what information each part of the comment represents.
When Doxygen processes the source code, it can turn this information into a formatted API reference. For our example, the technical writer is updating a separate Markdown page rather than changing the source-code comments. Either approach fits within a DocsAsCode workflow.
Once the correction is complete, the file is ready to be recorded in Git.
10:00 a.m. — Git tracks the changes
Git is a distributed version control system. It tracks changes to files over time and maintains a history of those changes. In a DocsAsCode environment, Git is central to the workflow because it allows writers and developers to work on the same documentation without relying on emailed attachments or manually exchanging files.
Before committing anything, you check the repository's status:
git status Git reports which files have been modified, added, or deleted. You stage the file you want to include in the next commit:
git add docs/configuration.md Staging tells Git which changes you want to record. Next, you create a commit:
git commit -m "Update configuration documentation" A commit is a recorded snapshot of the staged changes. It includes a message describing what was changed. Think of it as a checkpoint in the documentation's history. You haven't published anything yet. You've simply recorded your work in the local Git repository.
This distinction matters. Git tracks the development of the documentation just as it tracks changes to the application itself. If someone later needs to understand when an instruction changed, who changed it, or what the previous version said, the repository's history provides that information.
10:30 a.m. — Sending the changes to GitHub
Your local repository contains the changes, but the rest of the team needs access to them. This is where GitHub comes in.
Git and GitHub are related, but they aren't the same thing. Git is the version control system. GitHub is a cloud-based platform that hosts Git repositories and provides collaboration features. The repository on GitHub is commonly called the remote repository. Your local repository is the copy you're working with on your computer.
When you're ready to share your changes, you push your commit:
git push Git sends your committed changes to the remote repository. The files are now available on GitHub, along with their commit history. Other contributors can access the branch, review the changes, and work with the same project.
This is how documentation is stored in the cloud in a DocsAsCode environment. GitHub holds the source files, images, configuration files, and version history. It doesn't necessarily hold the finished documentation website. That website is generally generated from the source files later.
The distinction between source and output is important throughout the DocsAsCode process.
11:00 a.m. — Branches and pull requests
Before your changes become part of the main documentation, they need to be reviewed. Most development teams don't allow contributors to make changes directly to the main branch. Instead, they use Git branches.
A branch is a separate line of development within the repository. It allows someone to work on a change without immediately affecting the primary version of the project. You might create a branch specifically for your documentation update:
git switch -c update-configuration-docs You can now make and commit changes independently of the main branch. Once you've pushed the branch to GitHub, you open a pull request. A pull request is a request to merge changes from one branch into another, usually the main branch.
It also provides a central place for collaboration. Team members can compare modified files, leave comments, request revisions, and approve the proposed changes. In this example, a developer reviews your updated configuration instructions and notices that one of the environment variable names is incorrect. They leave a comment on the pull request.
You correct the name, commit the additional change, and push it to the same branch. The pull request updates automatically. The developer reviews the correction and approves the changes. The pull request is then merged into the main branch. Your documentation update is now part of the project's primary repository.
This is particularly useful in technical writing because developers, product owners, and subject matter experts can review documentation in the same environment where they review software changes. Documentation is no longer an isolated file being passed around for approval. It's part of the project.
1:00 p.m. — Doxygen turns the source into documentation
Now that the changes have been merged, it's time to turn the source files into something readers can use. This is where Doxygen comes in.
Doxygen is a documentation generator. It examines source-code comments and supported documentation files, interprets their structure, and generates formatted output. A project typically has a configuration file named Doxyfile. This file tells Doxygen where to find the source files, which file types to examine, where to place the generated output, and which output formats to produce.
For example, some of the configuration settings might look like this:
INPUT = src docs RECURSIVE = YES EXTRACT_ALL = YES GENERATE_HTML = YES GENERATE_LATEX = NO USE_MDFILE_AS_MAINPAGE = docs/index.md These settings tell Doxygen to examine the specified source directories and documentation files, search subdirectories, generate HTML output, and use the designated Markdown file as the main page. The actual configuration will vary from project to project.
To generate the documentation, you run:
doxygen Doxyfile Doxygen reads the configuration, processes the relevant files, and generates the documentation. If HTML output is enabled, the result is typically placed in a directory called html. That directory contains the generated website files, including HTML pages, stylesheets, scripts, and supporting resources.
You can open the generated index.html file in a browser and examine the documentation as readers will see it. The difference between the source and the output is worth understanding:
- The Markdown files and documentation comments are the source.
- The
Doxyfilecontrols how Doxygen processes that source. - The generated HTML files are the finished documentation output.
You generally edit the source files, not the generated HTML. When something changes, you run Doxygen again to produce an updated version. This is what makes the process repeatable. The same source files and configuration can be processed again whenever the documentation needs to be updated.
2:00 p.m. — Building and publishing automatically
In many DocsAsCode environments, building and publishing documentation are automated.
This is accomplished through continuous integration and continuous delivery (CI/CD). CI/CD tools automate tasks that would otherwise require someone to perform them manually. They can retrieve the latest source files, run checks, build documentation, and deploy the finished website. GitHub Actions is one example.
A project can contain a workflow file under:
.github/workflows/
This file defines what should happen when certain repository events occur. For example, a workflow might be configured to run whenever changes are merged into the main branch.
The workflow could:
- Retrieve the latest repository files.
- Install Doxygen and any required dependencies.
- Run Doxygen using the project's
Doxyfile. - Check whether the documentation build completed successfully.
- Deploy the generated files to a hosting platform.
The hosting platform might be GitHub Pages, a cloud hosting service, or the company's own web infrastructure. Once deployment finishes, the updated documentation is available on the published website.
There is no need to manually export a document, convert individual pages, or upload files one at a time. The source files have been updated, reviewed, merged, processed by Doxygen, and published through a connected workflow.
One important detail: GitHub Actions doesn't automatically publish documentation simply because it is enabled. The repository needs a configured workflow and a deployment destination.
3:00 p.m. — The cycle continues
Later in the afternoon, another developer makes a change to the application. This time, the update affects the authentication process. The developer commits the code changes and opens a pull request. During the review, someone identifies the documentation that also needs updating.
The technical writer follows the same process:
- Update the relevant source file.
- Commit the changes with Git.
- Push the branch to GitHub.
- Open a pull request.
- Get the changes reviewed and approved.
- Merge the changes into the
mainbranch. - Allow the automated workflow to build and publish the updated documentation.
The process repeats. Git maintains the documentation's history, Doxygen generates the updated output, and the publishing workflow makes the new version available to readers. The documentation is maintained alongside the software rather than being treated as a separate deliverable that someone remembers to update at the end of a development cycle.
What DocsAsCode really means
When you look at the entire working day, the individual tools start to make sense. Markdown and documentation comments provide the source content. Git tracks changes and maintains version history. GitHub provides a shared repository and collaboration environment. Branches and pull requests support review. Doxygen transforms the source into formatted documentation. CI/CD automates the build and publishing process.
These tools work together to create a connected documentation workflow. That's what DocsAsCode really means. It doesn't mean technical writers have to become software developers, or that documentation must be filled with complicated code. It means documentation is treated as a maintained part of the software project, with source files, version control, collaboration, review, and automated publishing.
The writing itself is still writing. You still need to understand the product, organize information, explain technical concepts, and make sure readers can follow the instructions. What changes is how that writing moves from your editor to the people who need it.
Instead of maintaining a separate document that gets exported and published through a manual process, you're working with files that live alongside the software, follow the same development workflow, and can be updated and published as part of the product's ongoing development.
That's DocsAsCode in a real working environment.
