This repository was archived by the owner on Apr 21, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ module.exports = function(grunt) {
17
17
{
18
18
from : '@@toc' ,
19
19
to : function ( ) {
20
- var tmp = grunt . config . get ( 'xh.tmp' ) ;
20
+ var tmp = grunt . config . get ( '<%%= xh.tmp %> ' ) ;
21
21
22
22
if ( ! grunt . file . exists ( tmp + '/csstoc.json' ) ) {
23
23
return '' ;
Original file line number Diff line number Diff line change @@ -105,17 +105,17 @@ var PageGenerator = yeoman.generators.Base.extend({
105
105
* @public
106
106
*/
107
107
updateIndex : function ( ) {
108
- var pagesRegex = / ( < ! - - @ @ p a g e s - - > ) ( ( . | \n ) * ) ( < ! - - \/ @ @ p a g e s - - > ) / img;
108
+ var pagesRegex = / ( < ! - - @ @ p a g e s - - > ) / img;
109
109
var pagesList = '' ;
110
110
111
- this . pages . forEach ( function ( pageName ) {
111
+ this . newPages . forEach ( function ( pageName ) {
112
112
var fileName = _ . kebabCase ( pageName ) + '.' + this . configuration . extension ;
113
113
114
114
pagesList += '<li><i class="fa fa-file-o"></i><a href="dist/' + fileName + '"><strong>' + pageName + '</strong> ' + fileName + '</a><i class="fa fa-check"></i></li>\n' ;
115
115
} , this ) ;
116
116
117
117
// Write file
118
- this . fs . write ( 'index.html' , this . fs . read ( 'index.html' ) . replace ( pagesRegex , '$1' + pagesList + '$4' ) ) ;
118
+ this . fs . write ( 'index.html' , this . fs . read ( 'index.html' ) . replace ( pagesRegex , '$1' + pagesList ) ) ;
119
119
} ,
120
120
121
121
/**
You can’t perform that action at this time.
0 commit comments