index.js
function(page) {
            if (this.output.name != 'website' || page.search === false) {
                return page;
            }

            var text;
           
            this.log.debug.ln('index page', page.path);

            text = page.content;
            // Decode HTML
            text = Html.decode(text);
            // Strip HTML tags
            text = text.replace(/(<([^>]+)>)/ig, '');
            text = text.replace(/[\n ]+/g, ' ');
            var keywords = [];
            if (page.search) {
                keywords = page.search.keywords || [];
            }

            // Add to index
            var doc = {
                url: this.output.toURL(page.path),
                title: page.title,
                summary: page.description,
                keywords: keywords.join(' '),
                body: text
            };

            documentsStore[doc.url] = doc;

            return page;
        }
function(page) {
            if (this.output.name != 'website' || page.search === false) {
                return page;
            }

            var text;
           
            this.log.debug.ln('index page', page.path);

            text = page.content;
            // Decode HTML
            text = Html.decode(text);
            // Strip HTML tags
            text = text.replace(/(<([^>]+)>)/ig, '');
            text = text.replace(/[\n ]+/g, ' ');
            var keywords = [];
            if (page.search) {
                keywords = page.search.keywords || [];
            }

            // Add to index
            var doc = {
                url: this.output.toURL(page.path),
                title: page.title,
                summary: page.description,
                keywords: keywords.join(' '),
                body: text
            };

            documentsStore[doc.url] = doc;

            return page;
        }
function ( page ) { if ( this . output . name != 'website' || page . search === false ) { return page ; } var text ; this . log . debug . ln ( 'index page' , page . path ) ; text = page . content ; // Decode HTML text = Html . decode ( text ) ; // Strip HTML tags text = text . replace ( / (<([^>]+)>) / ig , '' ) ; text = text . replace ( / [\n ]+ / g , ' ' ) ; var keywords = [ ] ; if ( page . search ) { keywords = page . search . keywords || [ ] ; } // Add to index var doc = { url : this . output . toURL ( page . path ) , title : page . title , summary : page . description , keywords : keywords . join ( ' ' ) , body : text } ; documentsStore [ doc . url ] = doc ; return page ; }
Index each page
Index each page