@@ -97,12 +97,19 @@ CreateDatajs('./.deploy/js/dt.js',function(dt_path,arr){
9797 n :'搜索' ,
9898 d :'最专业的Linux命令大全,内容包含Linux命令手册、详解、学习,值得收藏的Linux命令速查手册。'
9999 } ) ;
100+
101+ ReadTmpToHTML ( '/template/hot.ejs' , '/.deploy/hot.html' , null , {
102+ p :'/hot.html' ,
103+ n :'搜索' ,
104+ d :'最专业的Linux命令大全,内容包含Linux命令手册、详解、学习,值得收藏的Linux命令速查手册。' ,
105+ arr :arr
106+ } ) ;
100107 // 文章批量生成
101108 arr . forEach ( function ( itm , idx ) {
102109 var ejstpm = path . join ( '/template/' , itm . p ) ;
103110 var md_path = path . join ( '/command' , itm . p ) ;
104111 var dep = path . join ( '/.deploy/c' , itm . p ) ;
105- ReadTmpToHTML ( '/template/details.ejs' , dep + '.html' , md_path + '.md' , itm )
112+ ReadTmpToHTML ( '/template/details.ejs' , dep + '.html' , md_path + '.md' , itm , arr )
106113 } ) ;
107114
108115 console . log ( success ( " → " ) , arr . length )
@@ -164,8 +171,9 @@ function CreateJS(from_path,to_path){
164171 * @param {[type] } to_path [生成到指定的位置]
165172 * @param {[type] } md_path [Markdown的路径] // 给md地址就生产详情页面
166173 * @param {[type] } des_json [页面信息 json 格式]
174+ * @param {[type] } arr []
167175 */
168- function ReadTmpToHTML ( from_path , to_path , md_path , des_json ) {
176+ function ReadTmpToHTML ( from_path , to_path , md_path , des_json , total_pages ) {
169177 var tmp_path = path . join ( path . dirname ( __dirname ) , from_path ) ;
170178 if ( ! exists ( tmp_path ) ) return console . log ( "\n → error: 模板文件 " + tmp_path + " 不存在" )
171179 var tmp_str = fs . readFileSync ( tmp_path ) ;
0 commit comments