Fix gitlab page

This commit is contained in:
Chocobozzz 2019-09-12 09:20:18 +02:00
parent b9f7a681d3
commit 56d32a6928
No known key found for this signature in database
GPG key ID: 583A612D890159BE
7 changed files with 15 additions and 8 deletions

View file

@ -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/

View file

@ -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>

View file

@ -111,7 +111,7 @@
methods: {
getPath (path) {
return path
return process.env.BASE_URL + path
}
}
}

View file

@ -68,7 +68,7 @@
methods: {
buildLocaleLink (locale) {
return window.location.origin + `/${locale}/`
return process.env.BASE_URL + `${locale}/`
}
}
}

View file

@ -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
})

View file

@ -1,7 +1,7 @@
export default {
methods: {
buildImgUrl: function (imageName) {
return '/img/' + imageName
return process.env.BASE_URL + 'img/' + imageName
}
}
}

View file

@ -1,3 +1,5 @@
module.exports = {
// options...
publicPath: process.env.GITLAB_CI
? '/joinpeertube/'
: '/'
}