Skip to content

Commit b483d5e

Browse files
committed
fix
1 parent 717c533 commit b483d5e

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

assets/navigation.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
navigation:
22
logo:
3-
url: '/'
3+
url: '/opensource/'
44
dark:
5-
icon: '_assets/icon/logo-dark.svg'
5+
icon: '/opensource/docs/_assets/icon/logo-dark.svg'
66
light:
7-
icon: '_assets/icon/logo.svg'
7+
icon: '/opensource/docs/_assets/icon/logo.svg'
88
header:
99
rightItems:
1010
- type: search
1111
- type: 'button'
12-
img: '_assets/icon/github.svg'
12+
img: '/opensource/docs/_assets/icon/github.svg'
1313
theme: 'flat'
1414
text: 'GitHub'
1515
url: 'https://github.com/datalens-tech/datalens'

scripts/build-fix.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,18 @@ const fixFile = async (filePath, basePath) => {
206206
tag.text(STYLE_FIX);
207207
head.append(tag);
208208

209+
const docsPath = BUILD_SETTINGS.docsPath;
210+
209211
let html = $.html();
210212
html = html
213+
.replace(/"[^"]+?\/_bundle\/app\.client\.js"/g, `"${docsPath}/_bundle/app.client.js"`)
214+
.replace(/"[^"]+?\/_bundle\/app\.client\.css"/g, `"${docsPath}/_bundle/app.client.css"`)
215+
.replace(/href="_bundle\/([^"]+?)"/g, `href="${docsPath}/_bundle/$1"`)
216+
.replace(/src="_bundle\/([^"]+?)"/g, `src="${docsPath}/_bundle/$1"`)
217+
.replace(/src="_search\/([^"]+?)"/g, `src="${docsPath}/_search/$1"`)
218+
.replace(/src="([^"]+?)\/toc\.js"/g, `src="${docsPath}/$1/toc.js"`)
219+
// fix double load bundled resources
220+
.replace(/,"style":\[[^\]]+?\],"script":\[[^\]]+?\],/g, ',"style":[],"script":[],')
211221
.replace(
212222
/ *?<link type="text\/css" rel="stylesheet" href="_assets\/cut-extension.css">\n/g,
213223
'',

0 commit comments

Comments
 (0)