2

I have multiple docfx documentation in different repositories. How can I merge these documentation into one docfx project that contains multiple others?

Using docfx Cross Reference between Projects didn´t solve my problem since it just links me between projects but doesn´t merge.

patridge
  • 26,385
  • 18
  • 89
  • 135
T.Harms
  • 43
  • 4

1 Answers1

3

This may not be the best way but I have done this with Azure DevOps build/release pipelines. It did not involve API documentation so I can't speak to whether this would work for that. For what it's worth:

Assuming each repo has its own Markdown files and images...

Create a build pipeline for each repo that publishes its contents as an artifact.

Create a release pipeline...

enter image description here

...that downloads each artifact to one place.

enter image description here

DocFx provides a release pipeline task. Add that to the release pipeline.

Create a universal docfx.json in a central place. Include paths to each of the downloaded artifacts.

Point the DocFx release pipeline task to the docfx.json file.

To apply a custom template, create a repo for the template and follow the same steps: publish it as an artifact, download it with the release pipeline, and reference the directory with the docfx.json.

hcdocs
  • 1,078
  • 2
  • 18
  • 30
  • 1
    This is great step-by-step, do you have an example of how to point the docfx.json to the downloaded artifacts? It mine isn't able to find them. – Jade Oct 28 '20 at 11:37
  • what if i have one ui page where i ask for repo url and out of that i need to generate doc? which approch is best i tried exe but it tool local path only and i tried nuget which is related with one single project – Neo Mar 09 '22 at 18:40