docfx icon indicating copy to clipboard operation
docfx copied to clipboard

Example of Overwrite Files usage

Open vdecristofaro opened this issue 10 years ago • 1 comments

I am trying to use Overwrite Files feature explained here.

I have the following swagger file

{
  "swagger": "2.0",
  "info": {
    "title": "MyProject",
    "description": "Documentation of the MyProject API module",
    "version": "1.0"
  },
  "host": "api.myproject.com",
  "basePath": "/cp",
  "schemes": [
    "https"
  ],
  ....
}

So standing on the documentation, I have created a file named cp_moreinfo.md in the same folder as the swagger file (restapi folder) with the following content:


---
uid: api.myproject.com/cp/MyProject/1.0

---

Further description for My Project API module

Then tried to build the doc. The text Further description for My Project API module does not appear in the generated documentation. I have tried with footer and also with API uids but nothing. Is there something that I am missing out?

vdecristofaro avatar Nov 01 '16 17:11 vdecristofaro

@vdecristofaro in fact the overwrite file need not be in the same restapi folder, but need to add this md file to overwrite section of docfx.json as below:

"overwrite": "specs/*.md",

REST overwrite sample of docfx-seed is here:

  1. Overwrite section in docfx.json
  2. Overwrite file
  3. Final page

hellosnow avatar Nov 02 '16 03:11 hellosnow