Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions website/library/explanation/documentation-as-code.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Documentation as Code: A Comprehensive Study Guide
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion:
To follow our style guide, all headings and headlines should be sentence case. Only the first letter of the first word should be capitalised, unless it is a product name like Ubuntu for example.

Suggested change
# Documentation as Code: A Comprehensive Study Guide
# Documentation as Code: A comprehensive study guide

**Presented by:** [Robert Krátký](https://github.com/rkratky) at Documentation Office Hours - ODH-015
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion:
I would use the name "Documentation Community Hours" which is the new name of the "Documentation Office Hours".

Suggested change
**Presented by:** [Robert Krátký](https://github.com/rkratky) at Documentation Office Hours - ODH-015
**Presented by:** [Robert Krátký](https://github.com/rkratky) during the Documentation Community Hours.


**Link to the video:** [Documentation as Code](https://www.youtube.com/watch?v=AVNfH99KiME)

## What does "Docs as Code" mean?
Copy link
Contributor

@Sophie-Pages Sophie-Pages Aug 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion:
I would explain that "Documentation as Code" is abbreviated with "Docs as Code" and use "Docs as Code" in the rest of the document with this specific case. Both "The docs as code approach" and "Also documentation as code enables valuable automation" were used in the document, and they aren't capitalized. Can you please review the rest of the document to make it more consistent?

Is a methodology that treats documentation like software source code, applying similar development practices to create and maintain documentation.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion:
When you read the title and the text together, it feels like the sentence is not complete: "What does "Docs as Code mean? Is a methodology...".

Suggested change
Is a methodology that treats documentation like software source code, applying similar development practices to create and maintain documentation.
## What does "Documentation as Code" mean?
Documentation as Code is a methodology that treats documentation like software source code, applying similar development practices to create and maintain documentation.

This approach emphasizes using specialized tools for different stages of documentation development.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion:
I would remove this sentence as it has duplicate information with one sentence from the next section: "... it employs specialized tools for each step of the documentation lifecycle."

Suggested change
This approach emphasizes using specialized tools for different stages of documentation development.


### Key Characteristics of Documentation as Code
The main difference between **Documentation as Code** and traditional documentation approaches is that instead of using a single monolithic system for the entire process,
it employs specialized tools for each step of the documentation lifecycle.
Comment on lines +11 to +12
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion:
I would simplify the sentence by swapping "a single monolithic system" by "a single tool". A "monolithic system" may not be clear to every user that arrive on the page (I know that is what Robert says in the video, but personally I don't find it super clear! What do you think?). For accessibility reasons, I would remove it. But you could also decide to explain it like we did with the "definition of done".

I would also swap "specialized tools for each step of the documentation lifecycle." by "specialized tools can be used to write, test, publish, or maintain documentation." because I don't want users to think that you have to use specialized tools at each step.

Suggested change
The main difference between **Documentation as Code** and traditional documentation approaches is that instead of using a single monolithic system for the entire process,
it employs specialized tools for each step of the documentation lifecycle.
The main difference between **Documentation as Code** and traditional documentation approaches is that instead of using a single tool for the entire process, specialized tools can be used to write, test, publish, or maintain documentation.


#### Tooling Components

| **Goals** | **Tools** | **Reason** |
|----------|----------|----------|
| Content authoring | Text editors | Not binary format, quite easy to start |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion:
I would explain the context of why Robert talked about "not binary format" which is that the files are in plain text, thus easy to read.

Suggested change
| Content authoring | Text editors | Not binary format, quite easy to start |
| Content authoring | Text editors | Is easy to read and easy to start with |

| Formatting, styling | Markup languages | The formatting and styling is based in semanticity as oppossed to the formatting being applied directly to the content enabling multiple output formats |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typos and suggestion:
I would make it coherent by starting with a verb like with the other rows.

Suggested change
| Formatting, styling | Markup languages | The formatting and styling is based in semanticity as oppossed to the formatting being applied directly to the content enabling multiple output formats |
| Formatting and styling | Markup languages | Based on semanticity as opposed to being applied directly to the content. Enables multiple output formats |

| Version control | Git, SVN, Mercurial, ... | Utilizes distributed version control systems like Git |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion:
I would use ", etc." throughout the document (yes the style guide doesn't agree with me but it's okay!). Can you please review the rest of the document with that idea in mind?

I think we usually utilize one version control system.

Suggested change
| Version control | Git, SVN, Mercurial, ... | Utilizes distributed version control systems like Git |
| Version control | Git, SVN, Mercurial, etc. | Utilizes a distributed version control system like Git |

| Issue tracking | JIRA, Bugzilla, Mantis... | Provides comprehensive change tracking capabilities |
| Testing, validation | Scripts, linters, spell-checks | Inspired by software testing (like unit tests). When scripts or filters are applied, proper testing ensures reusable checks for content accuracy |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion:
I would change "Testing, validation" by "Testing and validation" (and also "Formatting, styling" by "Formatting and styling").

I would also try to create only one concise sentence from those sentences: "Inspired by software testing (like unit tests). When scripts or filters are applied, proper testing ensures reusable checks for content accuracy". What do you think?

| Publishing | Site builders, CMS, ... | Uses Site builders to produce web ready HTML or feeds content into CMS systems, mirroring software development workflows |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion:

I would go further than what Robert shared by explaining the reason behind using site builders.

Suggested change
| Publishing | Site builders, CMS, ... | Uses Site builders to produce web ready HTML or feeds content into CMS systems, mirroring software development workflows |
| Publishing | Site builders, CMS, ... | Uses Site builders to automate the publishing process and reduce manual tasks |


## Benefits of Documentation as Code

### Developer Perspective
1. **Developer Familiarity & Confort:** Developers already know the tools (Git, scripting,etc) making it easier for them to contribute to documentation.
2. **Higher Engament:** Documentation becomes a natural part of the project, encouraging developers to treat it seriously and make quick, one-off fixes.
3. **Better Integration:** Documentation can be included in the "definition of done" ensuring it's part of product planning and validation, just like code.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion:
I would explain briefly what is the "definition of done" without going into details.

Suggested change
3. **Better Integration:** Documentation can be included in the "definition of done" ensuring it's part of product planning and validation, just like code.
3. **Better Integration:** Documentation can be included in the "definition of done" ensuring it's part of product planning and validation, just like code. The "definition of done" is a set of criteria that has to be met in order for tasks to be considered complete.

4. **Shared Responsability:** QA teams and developers can validate documentation, fostering alignment and reducing the perception of docs as an afterthought.
5. **Open Tooling Capabilities:** Using open source tooling for documentation promotes collaboration and consistency with the software development process.
Documentation integrated into development workflow
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion:
I would add this sentence in the third section.

Suggested change
Documentation integrated into development workflow
3. **Better Integration:** Documentation is integrated into the development workflow. For example, documentation tasks can be included in the "definition of done" ensuring they are part of product planning and validation, just like code.
4. **Shared Responsability:** QA teams and developers can validate documentation, fostering alignment and reducing the perception of docs as an afterthought.
5. **Open Tooling Capabilities:** Using open source tooling for documentation promotes collaboration and consistency with the software development process.


Comment on lines +26 to +34
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very great section: well summarized and clear. Great work!

### Organizational Benefits
Using open source tooling (like plan text markup and version control) avoids vendor lock-in unlike proprietary tools, which risk obsolescense or abandonment.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion:

I would remove the tools in the parenthesis to make the sentence more concise. We already explained the different tools in details.

Suggested change
Using open source tooling (like plan text markup and version control) avoids vendor lock-in unlike proprietary tools, which risk obsolescense or abandonment.
Using open-source tooling avoids vendor lock-in unlike proprietary tools, which risk obsolescense or abandonment.

This approach also offers flexibility in migrating formats, reduces organizational overhead, and aligns processes across teams,
enabling consistent automation and smoother coordination with software releases.
Comment on lines +37 to +38
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion:

I would separate the sentence into two shorter sentences to make the text easier to read.

Suggested change
This approach also offers flexibility in migrating formats, reduces organizational overhead, and aligns processes across teams,
enabling consistent automation and smoother coordination with software releases.
This approach offers flexibility in migrating formats, reduces organizational overhead, and aligns processes across teams. It also enables consistent automation and smoother coordination with software releases.


## Challenges and Considerations
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section is also very well done, with clear ideas and short explanations. What I really like about this section is that you make it easy for skimming (easy for the users to find information in the page).


1. **Resistance to change:** Teams used to existing workfkows (especially monolithic documentation tools) may push back due to unfamiliarity with new tools or have steep learning curves.
2. **Developer concerns:** Including documentation in the definition of done might slow down development agility and some developers may dislike increased visibility or accountability for docs.
3. **Technical hurdles:** Migrating legacy documentation to plain-text markup can be non-trivial, and tight schedules may risk release disruptions during the transition.
4. **Balancing Trade-offs:** While the benefits often outweigh these challenges, they must be carefully consideredes to ensure smooth adoption.

## Additional Commentaries

The docs as code approach offers key benefits like enabling documentation review in developers familiar environments (Github/Gitlab) and simpliying change tracking by keeping docs with code,
but also presents challenges such as tying documentation to development cycles and release freezes, difficulty switching between markup languages, significant time spent on formatting issues,
and the need for specialized tools that handle both writing and technical aspects effectively, potentially requiring dedicated staff for markup-related tasks despite its growing popularity.
Comment on lines +47 to +51
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo and suggestion:
I think this section could be a great summary. What do you think?

I would improve it's clarity by making the sentences shorter. If you agree, I'll let you modify it!

Suggested change
## Additional Commentaries
The docs as code approach offers key benefits like enabling documentation review in developers familiar environments (Github/Gitlab) and simpliying change tracking by keeping docs with code,
but also presents challenges such as tying documentation to development cycles and release freezes, difficulty switching between markup languages, significant time spent on formatting issues,
and the need for specialized tools that handle both writing and technical aspects effectively, potentially requiring dedicated staff for markup-related tasks despite its growing popularity.
## Summary
The docs as code approach offers key benefits like enabling documentation review in developers familiar environments (Github/Gitlab) and simplifying change tracking by keeping docs with code,
but also presents challenges such as tying documentation to development cycles and release freezes, difficulty switching between markup languages, significant time spent on formatting issues,
and the need for specialized tools that handle both writing and technical aspects effectively, potentially requiring dedicated staff for markup-related tasks despite its growing popularity.


### Branching and Versioning
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion:

This section could be a great fit for the "Challenge and considerations" section. What do you think?

Documentation as code my not suit every situation, its strongest advantage is seamless integration with software development branches,
Allowing documentation to evolve alongside code versions (e.g. maintaining separate docs for v1.0 fixes while developing v2.0). Key recommendations include using portable formats,
familiar editors and version control to maintain flexibility This approach is better for collaborative developer documentation but may be less suitable for regulatory and marketing content
requiring centralized technical writer control. The succesfull documentation as code implementation depends on team structure and documentation purpose, with its greatest value appearing in
environments where developers actively contribute to documentation.

### Automation Opportunities
Also documentation as code enables valuable automation, particularly for autogenerated documentation that lives alongside the code. (e.g.incorrect autogenerated documentation actually
can catch software errors before release). Also keeping documentation in the same repository as code significantly simplifies testing purposes and automation.
Comment on lines +60 to +62
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion:
I feel like this part would be a great fit for the section "Benefits of Documentation as Code" and subsection "Organizational Benefits". What do you think?



**Please also check:**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion:
I think that it is a great idea to add the slides at the end!

I would use the header "Next steps" which is commonly used throughout Canonical's documentation. We could also add a link to the next Documentation Community Hour (https://discourse.ubuntu.com/t/community-hour/42771). What do you think?

Suggested change
**Please also check:**
## Next steps


[Slide used in the video](https://docs.google.com/presentation/d/1R6N8rZbV1cfWAcyGep-p8pyylFAwWjfIYsONILRNm8M/edit?slide=id.p#slide=id.p)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo:

Suggested change
[Slide used in the video](https://docs.google.com/presentation/d/1R6N8rZbV1cfWAcyGep-p8pyylFAwWjfIYsONILRNm8M/edit?slide=id.p#slide=id.p)
[Slides used in the video](https://docs.google.com/presentation/d/1R6N8rZbV1cfWAcyGep-p8pyylFAwWjfIYsONILRNm8M/edit?slide=id.p#slide=id.p)




13 changes: 13 additions & 0 deletions website/library/explanation/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Explanation

## Articles
Provide concise summaries to topics presented in Documentation Office Hours.
- [Documentation as Code](documentation-as-code)

```{toctree}
:hidden:
:titlesonly:
:maxdepth: 1

Documentation as Code <documentation-as-code>
```
1 change: 1 addition & 0 deletions website/library/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,6 @@ This section is currently under development. If you'd like to contribute, please

Reference <reference/index>
Tutorials <tutorials/index>
Explanation <explanation/index>

```