Skip to content

Commit

Permalink
fix: setup assets location + mysql migration 2.4.13
Browse files Browse the repository at this point in the history
  • Loading branch information
NGPixel committed Jun 1, 2020
1 parent d19bf6c commit 3891816
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 19 deletions.
4 changes: 2 additions & 2 deletions client/components/setup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
.body-2.mt-3 Cloning the master branch directly from GitHub is #[strong NOT] the proper way to install Wiki.js!
.body-2 Read the #[a(href='https://docs.requarks.io/install', style='color: #FFF;') documentation] on correctly installing the latest stable version.
.text-center
img.setup-logo.animated.fadeInUp.wait-p2s(src='/svg/logo-wikijs-full.svg', alt='Wiki.js Logo')
img.setup-logo.animated.fadeInUp.wait-p2s(src='/_assets/svg/logo-wikijs-full.svg', alt='Wiki.js Logo')
v-alert(v-model='error', type='error', icon='mdi-alert', tile, dismissible) {{ errorMessage }}
v-alert(v-if='!error', tile, color='blue lighten-5', :value='true')
v-icon.mr-3(color='blue') mdi-package-variant
Expand Down Expand Up @@ -249,7 +249,7 @@ export default {
height: 100vh;
z-index: 0;
background-color: transparent;
background-image: url(/svg/motif-grid.svg) !important;
background-image: url(/_assets/svg/motif-grid.svg) !important;
background-size: 100px;
background-repeat: repeat;
animation: bg-anim 100s linear infinite;
Expand Down
14 changes: 7 additions & 7 deletions dev/templates/legacy.pug
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ html
meta(name='viewport', content='user-scalable=yes, width=device-width, initial-scale=1, maximum-scale=5')
meta(name='theme-color', content='#1976d2')
meta(name='msapplication-TileColor', content='#1976d2')
meta(name='msapplication-TileImage', content='/favicons/mstile-150x150.png')
meta(name='msapplication-TileImage', content='/_assets/favicons/mstile-150x150.png')

title= pageMeta.title + ' | ' + config.title

Expand All @@ -20,12 +20,12 @@ html
meta(property='og:site_name', content=config.title)

//- Favicon
link(rel='apple-touch-icon', sizes='180x180', href='/favicons/apple-touch-icon.png')
link(rel='icon', type='image/png', sizes='192x192', href='/favicons/android-icon-192x192.png')
link(rel='icon', type='image/png', sizes='32x32', href='/favicons/favicon-32x32.png')
link(rel='icon', type='image/png', sizes='16x16', href='/favicons/favicon-16x16.png')
link(rel='mask-icon', href='/favicons/safari-pinned-tab.svg', color='#1976d2')
link(rel='manifest', href='/manifest.json')
link(rel='apple-touch-icon', sizes='180x180', href='/_assets/favicons/apple-touch-icon.png')
link(rel='icon', type='image/png', sizes='192x192', href='/_assets/favicons/android-icon-192x192.png')
link(rel='icon', type='image/png', sizes='32x32', href='/_assets/favicons/favicon-32x32.png')
link(rel='icon', type='image/png', sizes='16x16', href='/_assets/favicons/favicon-16x16.png')
link(rel='mask-icon', href='/_assets/favicons/safari-pinned-tab.svg', color='#1976d2')
link(rel='manifest', href='/_assets/manifest.json')

//- Icon Set
if config.theming.iconset === 'fa'
Expand Down
14 changes: 7 additions & 7 deletions dev/templates/setup.pug
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ html
meta(name='viewport', content='user-scalable=yes, width=device-width, initial-scale=1, maximum-scale=5')
meta(name='theme-color', content='#1976d2')
meta(name='msapplication-TileColor', content='#1976d2')
meta(name='msapplication-TileImage', content='/favicons/mstile-150x150.png')
meta(name='msapplication-TileImage', content='/_assets/favicons/mstile-150x150.png')
title Wiki.js Setup

//- Favicon
link(rel='apple-touch-icon', sizes='180x180', href='/favicons/apple-touch-icon.png')
link(rel='icon', type='image/png', sizes='192x192', href='/favicons/android-chrome-192x192.png')
link(rel='icon', type='image/png', sizes='32x32', href='/favicons/favicon-32x32.png')
link(rel='icon', type='image/png', sizes='16x16', href='/favicons/favicon-16x16.png')
link(rel='mask-icon', href='/favicons/safari-pinned-tab.svg', color='#1976d2')
link(rel='manifest', href='/manifest.json')
link(rel='apple-touch-icon', sizes='180x180', href='/_assets/favicons/apple-touch-icon.png')
link(rel='icon', type='image/png', sizes='192x192', href='/_assets/favicons/android-chrome-192x192.png')
link(rel='icon', type='image/png', sizes='32x32', href='/_assets/favicons/favicon-32x32.png')
link(rel='icon', type='image/png', sizes='16x16', href='/_assets/favicons/favicon-16x16.png')
link(rel='mask-icon', href='/_assets/favicons/safari-pinned-tab.svg', color='#1976d2')
link(rel='manifest', href='/_assets/manifest.json')

//- Site Lang
script.
Expand Down
14 changes: 12 additions & 2 deletions server/db/migrations/2.4.13.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
/* global WIKI */

exports.up = knex => {
return knex.schema
.alterTable('pages', table => {
table.json('extra').notNullable().defaultTo('{}')
if (WIKI.config.db.type === 'mysql') {
table.json('extra')
} else {
table.json('extra').notNullable().defaultTo('{}')
}
})
.alterTable('pageHistory', table => {
table.json('extra').notNullable().defaultTo('{}')
if (WIKI.config.db.type === 'mysql') {
table.json('extra')
} else {
table.json('extra').notNullable().defaultTo('{}')
}
})
.alterTable('users', table => {
table.string('dateFormat').notNullable().defaultTo('')
Expand Down
2 changes: 1 addition & 1 deletion server/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ module.exports = () => {
// ----------------------------------------

app.use(favicon(path.join(WIKI.ROOTPATH, 'assets', 'favicon.ico')))
app.use(express.static(path.join(WIKI.ROOTPATH, 'assets')))
app.use('/_assets', express.static(path.join(WIKI.ROOTPATH, 'assets')))

// ----------------------------------------
// View Engine Setup
Expand Down

0 comments on commit 3891816

Please sign in to comment.