Skip to content

Commit 73ef135

Browse files
committedMay 1, 2023
chore: quick fix for versioned deploy
1 parent d382b73 commit 73ef135

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed
 

‎scripts/website.js

+8-4
Original file line numberDiff line numberDiff line change
@@ -233,12 +233,12 @@ try {
233233
const docsFilemap = require('../docs/source/index');
234234
const files = Object.keys(docsFilemap.fileMap);
235235

236-
const wrapMarkdown = (md, baseLayout) => `
236+
const wrapMarkdown = (md, baseLayout, versionedPath) => `
237237
extends ${baseLayout}
238238
239239
append style
240-
link(rel="stylesheet", href="#{versions.versionedPath}/docs/css/inlinecpc.css")
241-
script(type="text/javascript" src="#{versions.versionedPath}/docs/js/native.js")
240+
link(rel="stylesheet", href="${versionedPath}/docs/css/inlinecpc.css")
241+
script(type="text/javascript" src="${versionedPath}/docs/js/native.js")
242242
style.
243243
p { line-height: 1.5em }
244244
@@ -293,7 +293,11 @@ async function pugify(filename, options) {
293293
const lines = contents.split('\n');
294294
lines.splice(2, 0, cpc);
295295
contents = lines.join('\n');
296-
contents = wrapMarkdown(contents, path.relative(path.dirname(filename), path.join(cwd, 'docs/layout')));
296+
contents = wrapMarkdown(
297+
contents,
298+
path.relative(path.dirname(filename), path.join(cwd, 'docs/layout')),
299+
versionObj.versionedPath
300+
);
297301
newfile = filename.replace('.md', '.html');
298302
}
299303

0 commit comments

Comments
 (0)
Please sign in to comment.