1
0
mirror of synced 2025-12-22 11:26:57 -05:00
Files
docs/lib/algolia/find-indexable-pages.js
Vanessa Yuen 3df90fc9b8 Hello git history spelunker!
Are you looking for something? Here is all of the GitHub Docs history in one single commit. Enjoy! 🎉
2020-09-27 14:10:11 +02:00

15 lines
506 B
JavaScript

const loadPages = require('../pages')
module.exports = async function findIndexablePages () {
const allPages = await loadPages()
const indexablePages = allPages
// exclude pages that are part of WIP products
.filter(page => !page.parentProduct || !page.parentProduct.wip)
// exclude index homepages
.filter(page => !page.relativePath.endsWith('index.md'))
console.log('total pages', allPages.length)
console.log('indexable pages', indexablePages.length)
return indexablePages
}