Skip to content

Commit

Permalink
fix: update
Browse files Browse the repository at this point in the history
  • Loading branch information
init-qy committed Nov 18, 2023
1 parent 1034c35 commit 9376b34
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions docs/.vuepress/components/utils/url.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import { usePageData } from '@vuepress/client'
import { baseUrl } from '../constants/constants'

export function getAssetsUrl(assetsName: string) {
const pageData = usePageData()
return baseUrl.substring(0, baseUrl.length - 1) + pageData.value.path.replace(/\/e[ns]\//, '/').replace(/\/[^\/]*$/, '/') + assetsName
const pagepath = window.location.pathname
return pagepath.replace(/\/e[ns]\//, '/').replace(/\/[^\/]*$/, '/') + assetsName
}

0 comments on commit 9376b34

Please sign in to comment.