使用doxmate生成文檔

 主頁:http://html5ify.com/doxmate/css

 在windows下面使用doxmate

1. 下載node.js(msi)並安裝 http://www.nodejs.org/download/html

2. 添加環境變量 (看你具體安裝路徑);C:\Users\Administrator\AppData\Roaming\npm前端

3. 安裝doxmate : 打開cmd 運行 npm install doxmate -g html5

到此已安裝完成;node


在包含package.json 、readme.md的目錄下運行doxmate buildnpm

或者:doxmate build -o output -s wordpress 
json


修改doxmate 生成文檔樣式

C:\Users\Administrator\AppData\Roaming\npm\node_modules\doxmate\templates\default
windows

此目錄下:api

api.html : 掃描lib下面的js生成的文檔
doc.html : 掃描doc目錄下面的md文件,生成的文檔
index.ejs : 生成doc目錄下面的md文件的索引
header.ejs : 頁面頭部
footer.ejs : 頁面尾部
sidebar.ejs : lib下面js生成的文檔內容
section.html : lib下面js生成的文檔的索引
ide

也能夠修改base.css 


doc 目錄下md文件排序 : 

文件名前面下劃線越多,排名越靠前,在header.ejs 中修改

          var keys = Object.keys(docs);           keys.sort(function (a, b) {           //按照名稱前端的_排序,越多越靠前           var a_pri = a.lastIndexOf('_');           var b_pri = b.lastIndexOf('_');             return a_pri > b_pri ? -1 : 1;           });

相關文章
相關標籤/搜索