forked from nutomic/joinpeertube
Fix gitlab page
This commit is contained in:
parent
b9f7a681d3
commit
56d32a6928
7 changed files with 15 additions and 8 deletions
|
@ -7,9 +7,10 @@ pages:
|
|||
script:
|
||||
- yarn install --pure-lockfile
|
||||
- npm run build
|
||||
- rm -r public/ && mv dist/ public/
|
||||
artifacts:
|
||||
paths:
|
||||
- dist
|
||||
- public
|
||||
cache:
|
||||
paths:
|
||||
- node_modules/
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title></title>
|
||||
|
||||
<link rel="shortcut icon" href="/img/icons/favicon.png">
|
||||
<link rel="apple-touch-icon" href="/img/icons/apple-touch-icon.png" />
|
||||
<link rel="shortcut icon" href="<%= BASE_URL %>img/icons/favicon.png">
|
||||
<link rel="apple-touch-icon" href="<%= BASE_URL %>img/icons/apple-touch-icon.png" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
|
|
@ -111,7 +111,7 @@
|
|||
|
||||
methods: {
|
||||
getPath (path) {
|
||||
return path
|
||||
return process.env.BASE_URL + path
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
|
||||
methods: {
|
||||
buildLocaleLink (locale) {
|
||||
return window.location.origin + `/${locale}/`
|
||||
return process.env.BASE_URL + `${locale}/`
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,6 +54,10 @@ Vue.component('vue-headful', vueHeadful)
|
|||
Vue.mixin(CommonMixins)
|
||||
|
||||
const routes = [
|
||||
{
|
||||
path: '',
|
||||
component: Home
|
||||
},
|
||||
{
|
||||
path: '/',
|
||||
component: Home
|
||||
|
@ -73,7 +77,7 @@ for (const locale of allLocales) {
|
|||
|
||||
const router = new VueRouter({
|
||||
mode: 'history',
|
||||
base: `${__dirname}${process.env.BASE_URL}`,
|
||||
base: process.env.BASE_URL,
|
||||
routes
|
||||
})
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
export default {
|
||||
methods: {
|
||||
buildImgUrl: function (imageName) {
|
||||
return '/img/' + imageName
|
||||
return process.env.BASE_URL + 'img/' + imageName
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
module.exports = {
|
||||
// options...
|
||||
publicPath: process.env.GITLAB_CI
|
||||
? '/joinpeertube/'
|
||||
: '/'
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue