3

Looking at the flow DocFX seems to create .md files and then convert that to html when creating documentation.

Is there a way to make DocFX output to .md files instead of html ?

Orn Kristjansson
  • 3,435
  • 4
  • 26
  • 40

1 Answers1

2

Update: I should misunderstand this question in my original answer. Actually, this is still an open feature request of DocFX, which is hard to achieve with the current architecture.

See: https://github.com/dotnet/docfx/issues/684


Original answer:

You should move the .md files from content to resource in docfx.json.

Take the follow docfx.json snippet as an example. All the .md files in articles will be converted to .html in the output.

...
"build": {
  "content": [
    {
      "files": ["articles/**.md"]
    }
  ]
}
...

If you hope articles/sample.md remains unconverted, you can change docfx.json as below:

...
"build": {
  "content": [
    {
      "files": ["articles/**.md"],
      "exclude": ["articles/sample.md"]
    }
  ]
  "resource": [
    {
      "files": ["articles/sample.md"]
    }
  ]
}
...

More information can be found on DocFX User Manual.

Yuby
  • 808
  • 7
  • 19