index.js
/**
         * extend page data
         * 
         * Note: we use this method to get all tags available and to
         *       create an index that we can store as dynamic module.
         */
extend page data

we use this method to get all tags available and to
create an index that we can store as dynamic module.
extend page data we use this method to get all tags available and to create an index that we can store as dynamic module .
async extendPageData($page) {
            const {
                _filePath,           
                _computed,           
                _content,            
                _strippedContent,    
                key,                 
                frontmatter,         
                regularPath,         
                path,                
            } = $page
            if (! frontmatter.publish) return
            let tags = frontmatter[config.key]
            if (! tags) return
            tags.forEach(function(tag) {
                if (!tags_collection[tag]) {
                    tags_collection[tag] = []
                }
                tags_collection[tag].push(key)
            })
        }
async extendPageData ( $page ) { const { _filePath , _computed , _content , _strippedContent , key , frontmatter , regularPath , path , } = $page if ( ! frontmatter . publish ) return let tags = frontmatter [ config . key ] if ( ! tags ) return tags . forEach ( function ( tag ) { if ( ! tags_collection [ tag ] ) { tags_collection [ tag ] = [ ] } tags_collection [ tag ] . push ( key ) } ) }
extend page data
extend page data
// file's absolute path // access the client global computed mixins at build time, e.g _computed.$localePath. // file's raw content string // file's content string without frontmatter // page's unique hash key // page's frontmatter object // current page's default link (follow the file hierarchy) // current page's real link (use regularPath when permalink does not exist) // skip if the page is not published // get tags from page // if there are no tags, we can skip // loop through the tags and push them // to the tags collection if not available. // also make sure that we keep a reference // to the page so we can resolve it later