There's something I'm missing in DocFX configuration - so it does not generate proper documentation.
I have a following folder structure:
+Documentation
|- _site
|- api
|- apidoc
|- articles
|- images
|- src <-- This folder is autogenerated by `docfx init` command as a folders above
docfx.json
index.md
toc.md
+packages
|- Microsoft.NETCore.Platforms.1.0.1
|- ... other nuget folders
+src
|- MyRealProject
|- assets
|- bin
|- Commands
|- obj
|- Properties
|- vendor <- This folder should be excluded for documentation
app.config
MyRealProject.csproj
MyRealProject.csproj.user
Program.cs
+test
|-MyRealProjext.XUnit
|- bin
|- obj
|- Properties
app.config
.gitattributes
.gitignore
.gitmodule
MyRealProject.sln
My docfx.json:
{
"metadata": [
{
"src": [
{
"files": [
"**/*.csproj"
],
"exclude": [
"**/obj/**",
"**/bin/**",
"_site/**",
"vendor/**"
],
"src": "../src"
}
],
"dest": "api"
}
],
"build": {
"content": [
{
"files": [
"api/**.yml",
"api/index.md"
]
},
{
"files": [
"articles/**.md",
"articles/**/toc.yml",
"toc.yml",
"*.md"
],
"exclude": [
"obj/**",
"_site/**"
]
}
],
"resource": [
{
"files": [
"images/**"
],
"exclude": [
"obj/**",
"_site/**"
]
}
],
"overwrite": [
{
"files": [
"apidoc/**.md"
],
"exclude": [
"obj/**",
"_site/**"
]
}
],
"dest": "_site",
"globalMetadataFiles": [],
"fileMetadataFiles": [],
"template": [
"default"
],
"postProcessors": [],
"noLangKeyword": false
}
}
running the command docfx build
generate documentation without erros but when navigating to http://locahost:8080
open directory listing instead the index.html
from _site
folder. I mean I see an web page with just folders list:
api/
apidoc/
articles/
images/
_site/
etc..
and even If I enter into the _site
folder and click on index.html
- it does open the docfx generated page but clicking on 'Api documentation' on the top shows text: TODO: Add .NET projects to the src folder and run docfx to generate REAL API Documentation!
- What should I reconfigure in docfx.json so it would correctly read /src folder and not /Documentation/src folder ?
- Is this a correct way to exclude
vendor/
folder from insidesrc/
folder ?