Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

find-indexable-pages.js 611 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
  1. const { loadPages } = require('../pages')
  2. module.exports = async function findIndexablePages () {
  3. const allPages = await loadPages()
  4. const indexablePages = allPages
  5. // exclude hidden pages
  6. .filter(page => !page.hidden)
  7. // exclude pages that are part of WIP or hidden products
  8. .filter(page => !page.parentProduct || !page.parentProduct.wip || page.parentProduct.hidden)
  9. // exclude index homepages
  10. .filter(page => !page.relativePath.endsWith('index.md'))
  11. console.log('total pages', allPages.length)
  12. console.log('indexable pages', indexablePages.length)
  13. return indexablePages
  14. }
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...