diff --git a/scripts/website.js b/scripts/website.js index 0ef9598c708..ec650659034 100644 --- a/scripts/website.js +++ b/scripts/website.js @@ -235,18 +235,18 @@ const files = Object.keys(docsFilemap.fileMap); // api explicitly imported for specific file loading const apiReq = require('../docs/source/api'); -const wrapMarkdown = (md, baseLayout) => ` +const wrapMarkdown = (md, baseLayout, versionedPath) => ` extends ${baseLayout} append style - link(rel="stylesheet", href="#{versions.versionedPath}/docs/css/inlinecpc.css") - script(type="text/javascript" src="#{versions.versionedPath}/docs/js/native.js") + link(rel="stylesheet", href="${versionedPath}/docs/css/inlinecpc.css") + script(type="text/javascript" src="${versionedPath}/docs/js/native.js") style. p { line-height: 1.5em } block content - + :markdown ${md.split('\n').map(line => ' ' + line).join('\n')} @@ -364,7 +364,11 @@ async function pugify(filename, options, isReload = false) { const lines = contents.split('\n'); lines.splice(2, 0, cpc); contents = lines.join('\n'); - contents = wrapMarkdown(contents, path.relative(path.dirname(filename), path.join(cwd, 'docs/layout'))); + contents = wrapMarkdown( + contents, + path.relative(path.dirname(filename), path.join(cwd, 'docs/layout')), + versionObj.versionedPath + ); newfile = filename.replace('.md', '.html'); }