Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
handle windows paths in product definitions
  • Loading branch information
jeffmcaffer authored Oct 9, 2020
commit c906187cf7562cf5353085f8863f671314e7ca24
7 changes: 4 additions & 3 deletions lib/all-products.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const fs = require('fs')
const path = require('path')
const slash = require('slash')
const assert = require('assert')
const { difference } = require('lodash')
const yaml = require('js-yaml')
Expand All @@ -23,11 +24,11 @@ const internalProducts = {}

sortedProductIds.forEach(productId => {
const relPath = productId
const dir = path.join('content', relPath)
const toc = path.join(dir, 'index.md')
const dir = slash(path.join('content', relPath))
const toc = slash(path.join(dir, 'index.md'))
const { data } = frontmatter(fs.readFileSync(toc, 'utf8'))
const applicableVersions = getApplicableVersions(data.versions, toc)
const href = path.join('/', applicableVersions[0], productId)
const href = slash(path.join('/', applicableVersions[0], productId))

internalProducts[productId] = {
id: productId,
Expand Down