()
| 141 | |
| 142 | // Infer the parent product ID from the page's relative file path |
| 143 | get parentProductId() { |
| 144 | // Each page's top-level content directory matches its product ID |
| 145 | const id = this.relativePath.split('/')[0] |
| 146 | |
| 147 | // ignore top-level content/index.md |
| 148 | if (id === 'index.md') return null |
| 149 | |
| 150 | // make sure the ID is valid |
| 151 | if (process.env.NODE_ENV !== 'test') { |
| 152 | assert(productMapKeysAsSet.has(id), `page ${this.fullPath} has an invalid product ID: ${id}`) |
| 153 | } |
| 154 | |
| 155 | return id |
| 156 | } |
| 157 | |
| 158 | get parentProduct() { |
| 159 | return productMap[this.parentProductId] |
nothing calls this directly
no outgoing calls
no test coverage detected