SubPointSolutions / subpointsolutions-docs

Documentation for SPMeta2, MetaPack, and other projects - http://docs.subpointsolutions.com
3 stars 4 forks source link

Refactor the main docs genetation workflow #135

Open SubPointSupport opened 7 years ago

SubPointSupport commented 7 years ago

After nearly a year of trying different ways of docs generation, we have come to a conclusion that the following docs generation workflow is to be implemented.

Backstory and problems

The main problem behind poor documentation across all our projects is that we couldn't find a great trade off on how to synchronize runnable, compilable C# examples and markdown documentation. Here are more details:

We want to have compilable, runnable examples

That means that all code examples are unit-tests that can be compiled, put under CI, run as they need to. We don't need to copy-paste code from example ti run it, we don't need to have additional setup to run an example from the documentation.

Not having this implemented leads to additional time waste and whole inefficiency while authoring and supporting documentation.

We don't want to have disconnection between examples and documentation

Comes close to the first one, meaning that we don't want to copy-paste example from the source code into markdown files and vise-verse. Samples in documentation are disconnected from the actual code base. Additional time for sync is needed, no one likes or want this.

Not having this implemented leads to additional time waste and whole inefficiency while authoring and supporting documentation.

All documentation and examples has to be in the current solution

With many projects, we have two strategies to author documentation:

Having a dedicated solution for docs aggregating docs across all project didn't work well. Here is why:

We learnt that docs has to live within a current project / solution. That way we leverage all the infrastructure for unit tests, code run that exist for the current project, we don't loose the context of the current project and can always fix up issue while writing docs.

Not having this implemented leads to additional time waste and whole inefficiency while authoring and supporting documentation.

Proposed docs authoring flow

All themes are shared via NuGet packages:

Final aim