Skip to content

Commit fcc94ea

Browse files
committed
chore: update theme
1 parent 34cdcf6 commit fcc94ea

File tree

1 file changed

+19
-7
lines changed
  • .vitepress/theme/nativescript-theme

1 file changed

+19
-7
lines changed

.vitepress/theme/nativescript-theme/index.js

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6286,15 +6286,20 @@ var script$c = defineComponent({
62866286
}
62876287

62886288
function getTargetUrl(url) {
6289-
if (url.includes('api-reference')) {
6290-
return url
6291-
}
6289+
var res = (function () {
6290+
if (url.includes('api-reference')) {
6291+
return url
6292+
}
62926293

6293-
if (url.startsWith(window.___location.origin)) {
6294-
return getRelativePath(url)
6295-
}
6294+
if (url.startsWith('http')) {
6295+
return getRelativePath(url)
6296+
}
62966297

6297-
return url
6298+
return url
6299+
})()
6300+
6301+
console.log("getTargetUrl('".concat(url, "') -> ").concat(res))
6302+
return res
62986303
}
62996304

63006305
function initialize(userOptions) {
@@ -6315,6 +6320,13 @@ var script$c = defineComponent({
63156320
router.go(targetUrl)
63166321
},
63176322
},
6323+
transformItems: function transformItems(items) {
6324+
return items.map(function (item) {
6325+
return Object.assign({}, item, {
6326+
url: getTargetUrl(item.url),
6327+
})
6328+
})
6329+
},
63186330
hitComponent: function hitComponent(_ref2) {
63196331
var hit = _ref2.hit,
63206332
children = _ref2.children

0 commit comments

Comments
 (0)