mirror of
https://github.com/twbs/bootstrap.git
synced 2025-10-02 16:28:26 +02:00
Docs: fix local assets path handling for Windows compatibility (#41485)
Co-authored-by: Julien Déramond <juderamond@gmail.com>
This commit is contained in:
committed by
GitHub
parent
374c8a1e1f
commit
d6ca5ba35b
@@ -1,6 +1,7 @@
|
||||
import fs from 'node:fs'
|
||||
import path from 'node:path'
|
||||
import { getConfig } from './config'
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
// The docs directory path relative to the root of the project.
|
||||
export const docsDirectory = getConfig().docsDir
|
||||
@@ -32,7 +33,7 @@ export function validateVersionedDocsPaths(distUrl: URL) {
|
||||
|
||||
for (const docsPath of generatedVersionedDocsPaths) {
|
||||
const sanitizedDocsPath = sanitizeVersionedDocsPathForValidation(docsPath)
|
||||
const absoluteDocsPath = path.join(distUrl.pathname, 'docs', docs_version, sanitizedDocsPath)
|
||||
const absoluteDocsPath = fileURLToPath(new URL(path.join( './docs', docs_version, sanitizedDocsPath), distUrl));
|
||||
|
||||
const docsPathExists = fs.existsSync(absoluteDocsPath)
|
||||
|
||||
|
Reference in New Issue
Block a user