APIDocjs 默认模板未更改为添加的新模板

问题描述 投票:0回答:1

我现在已将新模板安装到我的计算机中。

https://github.com/jodacame/apidocjs-template-dark-Slate-Inspiration-

根据上面链接中的文档显示,我已完成以下操作:

git clone https://github.com/jodacame/apidocjs-template-dark-Slate-Inspiration-.git
cd yourproject

this last line I've changed a bit:
Original as per template documentation:

apidoc --template ../apidocjs-template-dark-Slate-Inspiration-/template/

我的:

apidoc --template apidocjs-template-dark-Slate-Inspiration-/template/

文件夹结构:

project folder/
   apidocjs-template-dark-Slate-Inspiration-
   apidoc.json
   api_project.json
   api_project.js
   api_data.json
   api_data.js
   vendor
   locales
   fonts
   css

我的 apidoc.json 看起来像这样:

{
  "name": "XX API Introduction",
  "version": "0.1.0",
  "description": "wemfdkmesof.......",
  "title": "Custom apiDoc browser title",
  "url" : "http://xxx/api.php/v1",
  "template": {
    "withCompare": true,
    "withGenerator": true
  }
}

并且我总是在进行任何更改后运行此命令来生成文档:

apidoc -f .php -i ./ -o ./

请指导我为什么模板没有更改为新模板以及我该怎么做?

templates api-doc
1个回答
1
投票

尝试在每次更新文档时添加

-t path/to/template

例如。

apidoc -f .php -i ./ -o ./ -t ./apidocjs-template-dark-Slate-Inspiration-/template/
© www.soinside.com 2019 - 2024. All rights reserved.