Commit 6baa277f authored by NGPixel's avatar NGPixel

fix: migrate setup to vuetify + remove git related steps

parent 16d3336c
...@@ -44,7 +44,7 @@ window.Hammer = Hammer ...@@ -44,7 +44,7 @@ window.Hammer = Hammer
// Initialize Apollo Client (GraphQL) // Initialize Apollo Client (GraphQL)
// ==================================== // ====================================
const graphQLEndpoint = window.location.protocol + '//' + window.location.host + siteConfig.path + 'graphql' const graphQLEndpoint = window.location.protocol + '//' + window.location.host + '/graphql'
window.graphQL = new ApolloClient({ window.graphQL = new ApolloClient({
link: new BatchHttpLink({ link: new BatchHttpLink({
...@@ -65,17 +65,7 @@ Vue.use(VueClipboards) ...@@ -65,17 +65,7 @@ Vue.use(VueClipboards)
Vue.use(VueSimpleBreakpoints) Vue.use(VueSimpleBreakpoints)
Vue.use(localization.VueI18Next) Vue.use(localization.VueI18Next)
Vue.use(helpers) Vue.use(helpers)
Vue.use(VeeValidate, { Vue.use(VeeValidate, { events: '' })
enableAutoClasses: true,
classNames: {
touched: 'is-touched', // the control has been blurred
untouched: 'is-untouched', // the control hasn't been blurred
valid: 'is-valid', // model is valid
invalid: 'is-invalid', // model is invalid
pristine: 'is-pristine', // control has not been interacted with
dirty: 'is-dirty' // control has been interacted with
}
})
Vue.use(Vuetify) Vue.use(Vuetify)
Vue.prototype.Velocity = Velocity Vue.prototype.Velocity = Velocity
......
<template lang="pug"> <template lang="pug">
div v-app.setup
.container v-toolbar(color='blue darken-2', dark, app, clipped-left, fixed, flat)
.content(v-cloak) v-spacer
v-toolbar-title
span.subheading Wiki.js Setup
v-spacer
v-content
v-progress-linear.ma-0(indeterminate, height='4', :active='loading')
v-stepper.elevation-0(v-model='state')
v-stepper-header
v-stepper-step(step='1' :complete='state > 1')
| Welcome
small Wiki.js Installation Wizard
v-divider
v-stepper-step(step='2' :complete='state > 2')
| System Check
small Checking your system for compatibility
v-divider
v-stepper-step(step='3' :complete='state > 3')
| General Information
small Site Title, Language and Access
v-divider
v-stepper-step(step='4' :complete='state > 4')
| Administration Account
small Create the admin account
v-divider(v-if='this.conf.upgrade')
v-stepper-step(step='5' :complete='state > 5', v-if='this.conf.upgrade')
| Upgrade from Wiki.js 1.x
small Migrate your existing installation
v-divider
v-stepper-step(:step='this.conf.upgrade ? 6 : 5' :complete='this.conf.upgrade ? state > 5 : state > 6')
| Final Steps
small Finalizing your installation
v-stepper-items
//- ============================================== //- ==============================================
//- WELCOME //- WELCOME
//- ============================================== //- ==============================================
template(v-if='state === "welcome"') v-stepper-content(step='1')
.panel v-card.text-xs-center.pa-3(flat)
h2.panel-title.is-featured img(src='svg/logo-wikijs.svg', alt='Wiki.js Logo', style='width: 300px;')
span Welcome! v-container
i(v-if='loading') .body-2.py-2 This installation wizard will guide you through the steps needed to get your wiki up and running in no time!
.panel-content.is-text .body-1
.welcome | Detailed information about installation and usage can be found on the #[a(href='https://wiki.requarks.io/docs') official documentation site].
img(src='svg/logo-wikijs.svg', alt='Wiki.js Logo') br
h2 A modern, lightweight and powerful wiki app built on NodeJS, Git and Markdown | Should you have any question or would like to report something that doesn't look right, feel free to create a new issue on the #[a(href='https://github.com/Requarks/wiki/issues') GitHub project].
p This installation wizard will guide you through the steps needed to get your wiki up and running in no time! .body-1.pt-3
p Detailed information about installation and usage can be found on the #[a(href='https://wiki.requarks.io/docs') official documentation site]. #[br] Should you have any question or would like to report something that doesn't look right, feel free to create a new issue on the #[a(href='https://github.com/Requarks/wiki/issues') GitHub project].
.panel-content.form-sections
section
p
svg.icons.is-18.is-outlined.has-right-pad.is-text: use(xlink:href='#nc-cd-reader') svg.icons.is-18.is-outlined.has-right-pad.is-text: use(xlink:href='#nc-cd-reader')
span You are about to install Wiki.js #[strong {{wikiVersion}}]. span You are about to install Wiki.js #[strong {{wikiVersion}}].
section v-divider
p.control.is-fullwidth v-form
input#ipt-telemetry(type='checkbox', v-model='conf.telemetry', name='ipt-telemetry') v-checkbox(
label.label(for='ipt-telemetry') Allow Telemetry color='primary',
span.desc Help Wiki.js developers improve this app with anonymized #[a(href='https://wiki.requarks.io/docs/telemetry') telemetry]. v-model='conf.telemetry',
p.control.is-fullwidth label='Allow Telemetry',
input#ipt-upgrade(type='checkbox', v-model='conf.upgrade', name='ipt-upgrade') persistent-hint,
label.label(for='ipt-upgrade') Upgrade from Wiki.js 1.x hint='Help Wiki.js developers improve this app with anonymized telemetry.'
span.desc Check this box if you are upgrading from Wiki.js 1.x and wish to migrate your existing data. )
.panel-footer v-checkbox.mt-3(
.progress-bar: div(v-bind:style='{width: currentProgress}') color='primary',
button.button.is-small.is-light-blue(v-on:click='proceedToSyscheck', v-bind:disabled='loading') Start v-model='conf.upgrade',
label='Upgrade from Wiki.js 1.x',
persistent-hint,
hint='Check this box if you are upgrading from Wiki.js 1.x and wish to migrate your existing data.'
)
v-divider
.text-xs-center
v-btn(color='primary', @click='proceedToSyscheck', :disabled='loading') Start
//- ============================================== //- ==============================================
//- SYSTEM CHECK //- SYSTEM CHECK
//- ============================================== //- ==============================================
template(v-else-if='state === "syscheck"') v-stepper-content(step='2')
.panel v-card.text-xs-center(flat)
h2.panel-title.is-featured
span Wiki.js
i(v-if='loading')
.panel-content.is-text
.is-logo
svg.icons.is-64: use(xlink:href='#nc-metrics') svg.icons.is-64: use(xlink:href='#nc-metrics')
h4 System Check .subheading System Check
p(v-if='loading') #[svg.icons.is-24.is-text: use(xlink:href='#wk-msdots')] Checking your system for compatibility... v-container
p(v-if='!loading && syscheck.ok') v-layout(row, align-center, v-if='loading')
ul v-progress-circular(v-if='loading', indeterminate, color='blue')
li(v-for='rs in syscheck.results') #[svg.icons.is-18.is-text: use(xlink:href='#nc-check-bold')] {{rs}} .body-2.blue--text.ml-3 Checking your system for compatibility...
p(v-if='!loading && syscheck.ok') v-alert(type='success', outline, :value='!loading && syscheck.ok') Looks good! No issues so far.
svg.icons.is-18.is-text: use(xlink:href='#nc-check-bold') v-alert(type='error', outline, :value='!loading && !syscheck.ok') {{ syscheck.error }}
strong Looks good! No issues so far. v-list.mt-3(two-line, v-if='!loading && syscheck.ok', dense)
p(v-if='!loading && !syscheck.ok') #[svg.icons.is-18.is-text: use(xlink:href='#nc-square-remove-12')] Error: {{ syscheck.error }} template(v-for='(rs, n) in syscheck.results')
.panel-footer v-divider(v-if='n > 0', inset)
.progress-bar: div(v-bind:style='{width: currentProgress}') v-list-tile
button.button.is-small.is-light-blue.is-outlined(v-on:click='proceedToWelcome', v-bind:disabled='loading') Back v-list-tile-avatar(color='green lighten-5')
button.button.is-small.is-teal(v-on:click='proceedToSyscheck', v-if='!loading && !syscheck.ok') Check Again v-icon(color='green') check
button.button.is-small.is-red.is-outlined(v-on:click='proceedToGeneral', v-if='!loading && !syscheck.ok') Continue Anyway v-list-tile-content
button.button.is-small.is-light-blue(v-on:click='proceedToGeneral', v-if='loading || syscheck.ok', v-bind:disabled='loading') Continue v-list-tile-title {{rs.title}}
v-list-tile-sub-title {{rs.subtitle}}
v-divider
.text-xs-center
v-btn(@click='proceedToWelcome', :disabled='loading') Back
v-btn(color='primary', @click='proceedToSyscheck', v-if='!loading && !syscheck.ok') Check Again
v-btn(color='red', dark, @click='proceedToGeneral', v-if='!loading && !syscheck.ok') Continue Anyway
v-btn(color='primary', @click='proceedToGeneral', v-if='loading || syscheck.ok', :disabled='loading') Continue
//- ============================================== //- ==============================================
//- GENERAL //- GENERAL
//- ============================================== //- ==============================================
template(v-else-if='state === "general"') v-stepper-content(step='3')
.panel v-card.text-xs-center(flat)
h2.panel-title.is-featured
span Wiki.js
i(v-if='loading')
.panel-content.form-sections
section
.is-logo
svg.icons.is-64: use(xlink:href='#nc-webpage') svg.icons.is-64: use(xlink:href='#nc-webpage')
h4 General Information .subheading General Information
p.control.is-fullwidth v-form
label.label Site Title v-container
input(type='text', placeholder='e.g. Wiki', v-model='conf.title', data-vv-scope='general', name='ipt-title', v-validate='{ required: true, min: 2 }') v-layout(row, wrap)
span.desc The site title will appear in the top left corner on every page and within the window title bar. v-flex(xs12)
section.columns v-text-field(
.column.is-half v-model='conf.title',
p.control label='Site Title',
label.label Site UI Language :counter='255',
select(v-model='conf.lang') persistent-hint,
option(:value='lg.id', v-for='lg in langs') {{lg.name}} hint='The site title will appear in the top left corner on every page and within the window title bar.',
span.desc The language in which navigation, help and other UI elements will be displayed. v-validate='{ required: true, min: 2 }',
.column.is-half data-vv-name='siteTitle',
p.control.is-fullwidth data-vv-as='Site Title',
label.label Site Relative URL Path data-vv-scope='general',
input(type='text', placeholder='/', v-model='conf.path', data-vv-scope='general', name='ipt-path', v-validate='{ required: true, min: 1 }') :error-messages='errors.collect(`siteTitle`)'
span.desc The relative path to your wiki. Unless you configure a reverse proxy in front of Wiki.js to handle requests made to a sub-directory, #[strong it is recommended to leave the default value]. )
section.columns v-layout(row, wrap).mt-3
.column.is-half v-flex.pr-3(xs12, sm4)
p.control v-select(
label.label Server Port v-model='conf.lang',
input(type='text', placeholder='e.g. 80', v-model.number='conf.port', data-vv-scope='general', name='ipt-port', v-validate='{ required: true }') :items='langs',
span.desc The port on which Wiki.js will listen to. Usually port 80 if connecting directly, or a random port (e.g. 3000) if using a web server in front of it. Set #[strong $(PORT)] to use the PORT environment variable. label='Site UI Language',
.column.is-half item-value='id',
p.control.is-fullwidth item-text='name',
input#ipt-public(type='checkbox', v-model='conf.public', data-vv-scope='general', name='ipt-public') persistent-hint,
label.label(for='ipt-public') Public Access hint='The language in which navigation, help and other UI elements will be displayed.'
span.desc Should the site be accessible (read only) without login. )
p.control.is-fullwidth template(slot='item', slot-scope='data')
input#ipt-selfregister(type='checkbox', v-model='conf.selfRegister', data-vv-scope='general', name='ipt-selfregister') v-list-tile-avatar
label.label(for='ipt-selfregister') Allow Self-Registration v-avatar.blue.white--text(tile, size='40', v-html='data.item.id.toUpperCase()')
span.desc Can users create their own account to gain access? v-list-tile-content
section v-list-tile-title(v-html='data.item.name')
p.control.is-fullwidth v-list-tile-sub-title(v-html='data.item.original')
label.label Local Server Repository Path v-flex(xs12, sm8)
input(type='text', placeholder='e.g. ./repo', v-model='conf.pathRepo', data-vv-scope='general', name='ipt-repopath', v-validate='{ required: true, min: 2 }') v-text-field(
span.desc The path where the local git repository will be created, used to store content in markdown files and uploads.#[br] #[strong It is recommended to leave the default value]. v-model='conf.pathContent',
.panel-footer label='Content Data Path',
.progress-bar: div(v-bind:style='{width: currentProgress}') persistent-hint,
button.button.is-small.is-light-blue.is-outlined(v-on:click='proceedToSyscheck', v-bind:disabled='loading') Back hint='The path where content is stored (markdown files, uploads, etc.)',
button.button.is-small.is-light-blue(v-on:click='proceedToConsiderations', v-bind:disabled='loading || errors.any("general")') Continue v-validate='{ required: true, min: 2 }',
data-vv-name='pathContent',
//- ============================================== data-vv-as='Content Data Path',
//- CONSIDERATIONS data-vv-scope='general',
//- ============================================== :error-messages='errors.collect(`pathContent`)'
)
template(v-else-if='state === "considerations"') v-layout(row, wrap).mt-3
.panel v-flex.pr-3(xs12, sm4)
h2.panel-title.is-featured v-text-field(
span Wiki.js v-model='conf.port',
i(v-if='loading') label='Server Port',
.panel-content.is-text persistent-hint,
.is-logo hint='The port on which Wiki.js will listen to. Usually port 80 if connecting directly, or a random port (e.g. 3000) if using a web server in front of it. Set $(PORT) to use the PORT environment variable.',
svg.icons.is-64: use(xlink:href='#nc-radar') v-validate='{ required: true }',
h4 Important Considerations data-vv-name='port',
h3 Is Wiki.js going to be behind a web server (e.g. nginx / apache / IIS) or proxy? data-vv-as='Port',
p data-vv-scope='general',
ul :error-messages='errors.collect(`port`)'
li - Make sure the upload limit is sufficient. Most web servers have a low limit (e.g. 2 MB) by default. )
li - Do not rewrite URLs after the domain. This can cause unexpected issues in Wiki.js navigation. v-flex(xs12, sm8)
li - Do not remove or alter the client IP when proxying the requests. This can cause the authentication brute force protection to engage unexpectedly. v-text-field(
template(v-if='considerations.https') v-model='conf.pathData',
h3 The site will not be using HTTPS? #[svg.icons.is-20.is-outlined.animated.fadeOut.infinite: use(xlink:href='#nc-alert')] label='Temporary Data Path',
p The host URL you specified is not HTTPS. It is highly recommended to use HTTPS. You must use a web server / proxy (e.g. nginx / apache / IIS) in front of Wiki.js to use HTTPS. Wiki.js does not provide HTTPS handling by itself. persistent-hint,
template(v-if='considerations.port') hint='The path where temporary data is stored (cache, thumbnails, temporary upload files, etc.)',
h3 You are using a non-standard port. v-validate='{ required: true, min: 2 }',
p If you are not planning on using a web server / proxy in front of Wiki.js, be aware that users will need to specify the port when accessing the wiki. Make sure this is the intended behavior. Otherwise set a standard HTTP port such as 80. data-vv-name='pathData',
.panel-footer data-vv-as='Temporary Data Path',
.progress-bar: div(v-bind:style='{width: currentProgress}') data-vv-scope='general',
button.button.is-small.is-light-blue.is-outlined(v-on:click='proceedToGeneral', v-bind:disabled='loading') Back :error-messages='errors.collect(`pathData`)'
button.button.is-small.is-light-blue(v-on:click='proceedToGit', v-bind:disabled='loading') Continue )
v-layout(row, wrap).mt-3
//- ============================================== v-flex(xs12)
//- GIT v-checkbox(
//- ============================================== color='primary',
v-model='conf.public',
template(v-else-if='state === "git"') label='Public Access',
.panel persistent-hint,
h2.panel-title.is-featured hint='Should the site be accessible (read only) without login.'
span Wiki.js )
i(v-if='loading') v-checkbox.mt-2(
.panel-content.is-text color='primary',
.is-logo v-model='conf.selfRegister',
img(src='svg/logo-git.svg', alt='Git Logo') label='Allow Self-Registration',
h4 Git Repository persistent-hint,
p Wiki.js stores article content and uploads locally on disk. All content is then regularly kept in sync with a remote git repository. This acts a backup protection and provides history / revert features. While optional, it is <strong>HIGHLY</strong> recommended to setup the remote git repository connection. hint='Can users create their own account to gain access?'
.panel-content.form-sections )
section.columns v-divider
.column.is-two-thirds .text-xs-center
p.control.is-fullwidth v-btn(@click='proceedToSyscheck', :disabled='loading') Back
label.label Repository URL v-btn(color='primary', @click='proceedToAdmin', :disabled='loading') Continue
input(type='text', placeholder='e.g. git@github.com/org/repo.git or https://github.com/org/repo', v-model='conf.gitUrl', data-vv-scope='git', name='ipt-giturl', v-validate='{ required: true, min: 5 }')
span.desc The full git repository URL to connect to.
.column
p.control.is-fullwidth
label.label Branch
input(type='text', placeholder='e.g. master', v-model='conf.gitBranch', data-vv-scope='git', name='ipt-gitbranch', v-validate='{ required: true, min: 2 }')
span.desc The git branch to use when synchronizing changes.
section.columns
.column.is-one-third
p.control.is-fullwidth
label.label Authentication
select(v-model='conf.gitAuthType')
option(value='ssh') SSH using Private Key file (recommended)
option(value='sshenv') SSH using Private Key in environment variable
option(value='sshdb') SSH using Private Key in database
option(value='basic') Basic Credentials
span.desc The authentication method used to connect to your remote Git repository.
p.control.is-fullwidth
input#ipt-git-verify-ssl(type='checkbox', v-model='conf.gitAuthSSL')
label.label(for='ipt-git-verify-ssl') Verify SSL
.column(v-show='conf.gitAuthType === "basic"')
p.control.is-fullwidth
label.label Username
input(type='text', v-model='conf.gitAuthUser')
span.desc The username for the remote git connection.
.column(v-show='conf.gitAuthType === "basic"')
p.control.is-fullwidth
label.label Password
input(type='password', v-model='conf.gitAuthPass')
span.desc The password for the remote git connection.
.column(v-show='conf.gitAuthType === "ssh"')
p.control.is-fullwidth
label.label Private Key location
input(type='text', placeholder='e.g. /etc/wiki/keys/git.pem', v-model='conf.gitAuthSSHKey')
span.desc The full path to the #[strong unencrypted] private key on disk.
.column(v-show='conf.gitAuthType === "sshenv"')
p.control.is-fullwidth
label.label Private Key Environment Variable
input(type='text', placeholder='e.g. GIT_PRIVATE_KEY', v-model='conf.gitAuthSSHKeyEnv')
span.desc The environment variable containing the private key.
.column(v-show='conf.gitAuthType === "sshdb"')
p.control.is-fullwidth
label.label Private Key Contents
textarea(v-model='conf.gitAuthSSHKeyDB')
span.desc Paste the contents of the private key in the above field
section.columns
.column.is-one-third
p.control.is-fullwidth
input#ipt-git-show-user-email(type='checkbox', v-model='conf.gitShowUserEmail')
label.label(for='ipt-git-show-user-email') Commit using User Email
span.desc When enabled, commits are made as the current user name and email. If unchecked, the current user name will still be used but the default commit author email will be used instead.
.column
p.control.is-fullwidth
label.label Default Commit Author Email
input(type='text', placeholder='e.g. user@example.com', v-model.number='conf.gitServerEmail', data-vv-scope='git', name='ipt-gitsrvemail', v-validate='{ required: true, email: true }')
span.desc The default/fallback email to use when creating commits to the git repository.
.panel-footer
.progress-bar: div(v-bind:style='{width: currentProgress}')
button.button.is-small.is-light-blue.is-outlined(v-on:click='proceedToGeneral', v-bind:disabled='loading') Back
button.button.is-small.is-light-blue.is-outlined(v-on:click='conf.gitUseRemote = false; proceedToGitCheck()', v-bind:disabled='loading') Skip this step
button.button.is-small.is-light-blue(v-on:click='conf.gitUseRemote = true; proceedToGitCheck()', v-bind:disabled='loading || errors.any("git")') Continue
//- ==============================================
//- GIT CHECK
//- ==============================================
template(v-else-if='state === "gitcheck"')
.panel
h2.panel-title.is-featured
span Wiki.js
i(v-if='loading')
.panel-content.is-text
.is-logo
img(src='svg/logo-git.svg', alt='Git Logo')
h4 Git Repository Check
p(v-if='loading') #[svg.icons.is-24.is-text: use(xlink:href='#wk-msdots')] Verifying Git repository settings...
p(v-if='!loading && gitcheck.ok')
ul
li(v-for='rs in gitcheck.results') #[svg.icons.is-18.is-text: use(xlink:href='#nc-check-bold')] {{rs}}
p(v-if='!loading && gitcheck.ok')
svg.icons.is-18.is-text: use(xlink:href='#nc-check-bold')
strong Git settings are correct!
p(v-if='!loading && !gitcheck.ok') #[svg.icons.is-18.is-text: use(xlink:href='#nc-square-remove')] Error: {{ gitcheck.error }}
.panel-footer
.progress-bar: div(v-bind:style='{width: currentProgress}')
button.button.is-small.is-light-blue.is-outlined(v-on:click='proceedToGit', v-bind:disabled='loading') Back
button.button.is-small.is-teal(v-on:click='proceedToGitCheck', v-if='!loading && !gitcheck.ok') Try Again
button.button.is-small.is-light-blue(v-on:click='proceedToAdmin', v-if='loading || gitcheck.ok', v-bind:disabled='loading') Continue
//- ============================================== //- ==============================================
//- ADMINISTRATOR ACCOUNT //- ADMINISTRATOR ACCOUNT
//- ============================================== //- ==============================================
template(v-else-if='state === "admin"') v-stepper-content(step='4')
.panel v-card.text-xs-center(flat)
h2.panel-title.is-featured
span Wiki.js
i(v-if='loading')
.panel-content.is-text
.is-logo
svg.icons.is-64: use(xlink:href='#nc-man-black') svg.icons.is-64: use(xlink:href='#nc-man-black')
h4 Administrator Account .subheading Administrator Account
p A root administrator account will be created for local authentication. From this account, you can create or authorize more users. .body-2 A root administrator account will be created for local authentication. From this account, you can create or authorize more users.
.panel-content.form-sections v-form
section v-container
p.control.is-fullwidth v-layout(row, wrap)
label.label Administrator Email v-flex(xs12)
input(type='text', placeholder='e.g. admin@example.com', v-model='conf.adminEmail', data-vv-scope='admin', name='ipt-adminemail', v-validate='{ required: true, email: true }') v-text-field(
span.desc The email address of the administrator account autofocus
section.columns v-model='conf.adminEmail',
.column label='Administrator Email',
p.control.is-fullwidth hint='The email address of the administrator account',
label.label Password v-validate='{ required: true, email: true }',
input(type='password', v-model='conf.adminPassword', data-vv-scope='admin', name='ipt-adminpwd', v-validate='{ required: true, min: 8 }') data-vv-name='adminEmail',
span.desc At least 8 characters long. data-vv-as='Administrator Email',
.column data-vv-scope='admin',
p.control.is-fullwidth :error-messages='errors.collect(`adminEmail`)'
label.label Confirm Password )
input(type='password', v-model='conf.adminPasswordConfirm', data-vv-scope='admin', name='ipt-adminpwd2', v-validate='{ required: true, confirmed: "ipt-adminpwd" }') v-flex.pr-3(xs6)
span.desc Verify your password again. v-text-field(
.panel-footer ref='adminPassword',
.progress-bar: div(v-bind:style='{width: currentProgress}') v-model='conf.adminPassword',
button.button.is-small.is-light-blue.is-outlined(v-on:click='proceedToGit', v-bind:disabled='loading') Back label='Password',
button.button.is-small.is-light-blue(v-on:click='proceedToUpgrade', v-bind:disabled='loading || errors.any("admin")') Continue hint='At least 8 characters long.',
v-validate='{ required: true, min: 8 }',
data-vv-name='adminPassword',
data-vv-as='Password',
data-vv-scope='admin',
:error-messages='errors.collect(`adminPassword`)'
)
v-flex(xs6)
v-text-field(
v-model='conf.adminPasswordConfirm',
label='Confirm Password',
hint='Verify your password again.',
v-validate='{ required: true, confirmed: `$adminPassword` }',
data-vv-name='adminPasswordConfirm',
data-vv-as='Confirm Password',
data-vv-scope='admin',
:error-messages='errors.collect(`adminPasswordConfirm`)'
)
.text-xs-center
v-btn(@click='proceedToGeneral', :disabled='loading') Back
v-btn(color='primary', @click='proceedToUpgrade', :disabled='loading') Continue
//- ============================================== //- ==============================================
//- UPGRADE FROM 1.x //- UPGRADE FROM 1.x
//- ============================================== //- ==============================================
template(v-else-if='state === "upgrade"') v-stepper-content(step='5', v-if='conf.upgrade')
.panel v-card.text-xs-center(flat)
h2.panel-title.is-featured
span Wiki.js
i(v-if='loading')
.panel-content.is-text
.is-logo
svg.icons.is-64: use(xlink:href='#nc-spaceship') svg.icons.is-64: use(xlink:href='#nc-spaceship')
h4 Upgrade from Wiki.js 1.x .subheading Upgrade from Wiki.js 1.x
p Migrating from a Wiki.js 1.x installation is quick and simple. .body-2 Migrating from a Wiki.js 1.x installation is quick and simple.
.panel-content.form-sections v-form
section v-container
p.control.is-fullwidth v-layout(row)
label.label Connection String to Wiki.js 1.x MongoDB database v-flex(xs12)
input(type='text', placeholder='mongodb://', v-model='conf.upgMongo', data-vv-scope='upgrade', name='ipt-mongo', v-validate='{ required: true, min: 2 }') v-text-field(
span.desc A MongoDB database connection string where a Wiki.js 1.x installation is located. #[strong No alterations will be made to this database. ] v-model='conf.upgMongo',
.panel-footer placeholder='mongodb://',
.progress-bar: div(v-bind:style='{width: currentProgress}') label='Connection String to Wiki.js 1.x MongoDB database',
button.button.is-small.is-light-blue.is-outlined(v-on:click='proceedToAdmin', v-bind:disabled='loading') Back persistent-hint,
button.button.is-small.is-light-blue(v-on:click='proceedToFinal', v-bind:disabled='loading || errors.any("general")') Continue hint='A MongoDB database connection string where a Wiki.js 1.x installation is located. No alterations will be made to this database.',
v-validate='{ required: true, min: 2 }',
data-vv-name='upgMongo',
data-vv-as='MongoDB Connection String',
data-vv-scope='upgrade',
:error-messages='errors.collect(`upgMongo`)'
)
.text-xs-center
v-btn(@click='proceedToAdmin', :disabled='loading') Back
v-btn(color='primary', @click='proceedToFinal', :disabled='loading') Continue
//- ============================================== //- ==============================================
//- FINAL //- FINAL
//- ============================================== //- ==============================================
template(v-else-if='state === "final"') v-stepper-content(:step='conf.upgrade ? 6 : 5')
.panel v-card.text-xs-center(flat)
h2.panel-title.is-featured template(v-if='loading')
span Wiki.js v-progress-circular(size='64', indeterminate, color='blue')
i(v-if='loading') .subheading Finalizing your installation...
.panel-content.is-text template(v-else-if='final.ok')
.is-logo(v-if='loading')
svg.icons.is-64: use(xlink:href='#wk-msdots')
h4 Finalizing your installation...
.is-logo(v-if='!loading && final.ok')
svg.icons.is-64: use(xlink:href='#nc-check-bold') svg.icons.is-64: use(xlink:href='#nc-check-bold')
h4 Installation complete! .subheading Installation complete!
p(v-if='!loading && final.ok'): strong Wiki.js was configured successfully and is now ready for use. template(v-else)
p(v-if='!loading && final.ok') Click the #[strong Start] button below to access your newly configured wiki. svg.icons.is-64: use(xlink:href='#nc-square-remove')
p(v-if='!loading && !final.ok') #[svg.icons.is-18.is-text: use(xlink:href='#nc-square-remove')] Error: {{ final.error }} .subheading Something went wrong...
.panel-footer v-container
.progress-bar: div(v-bind:style='{width: currentProgress}') v-alert(type='success', outline, :value='!loading && final.ok') Wiki.js was configured successfully and is now ready for use.
button.button.is-small.is-light-blue.is-outlined(v-on:click='proceedToAdmin', v-if='!loading && !final.ok', v-bind:disabled='loading') Back v-alert(type='error', outline, :value='!loading && !final.ok') {{ final.error }}
button.button.is-small.is-teal(v-on:click='proceedToFinal', v-if='!loading && !final.ok') Try Again v-divider
button.button.is-small.is-green(v-on:click='finish', v-if='loading || final.ok', v-bind:disabled='loading') Start .text-xs-center
v-btn(@click='!conf.upgrade ? proceedToAdmin() : proceedToUpgrade()', :disabled='loading') Back
v-btn(color='primary', @click='proceedToFinal', v-if='!loading && !final.ok') Try Again
v-btn(color='success', @click='finish', v-if='loading || final.ok', :disabled='loading') Continue
footer v-footer.pa-3(app, absolute, color='grey darken-3', height='auto')
small Wiki.js Installation Wizard .caption.grey--text Wiki.js
small(v-if='conf.telemetry') Telemetry Client ID: {{telemetryId}} v-spacer
.caption.grey--text(v-if='conf.telemetry') Telemetry Client ID: {{telemetryId}}
</template> </template>
<script> <script>
...@@ -373,20 +334,12 @@ export default { ...@@ -373,20 +334,12 @@ export default {
data() { data() {
return { return {
loading: false, loading: false,
state: 'welcome', state: 1,
syscheck: { syscheck: {
ok: false, ok: false,
error: '', error: '',
results: [] results: []
}, },
dbcheck: {
ok: false,
error: ''
},
gitcheck: {
ok: false,
error: ''
},
final: { final: {
ok: false, ok: false,
error: '', error: '',
...@@ -396,21 +349,9 @@ export default { ...@@ -396,21 +349,9 @@ export default {
adminEmail: '', adminEmail: '',
adminPassword: '', adminPassword: '',
adminPasswordConfirm: '', adminPasswordConfirm: '',
gitAuthPass: '',
gitAuthSSHKey: '',
gitAuthSSHKeyEnv: '',
gitAuthSSHKeyDB: '',
gitAuthSSL: true,
gitAuthType: 'ssh',
gitAuthUser: '',
gitBranch: 'master',
gitServerEmail: '',
gitShowUserEmail: true,
gitUrl: '',
gitUseRemote: (siteConfig.git !== false),
lang: siteConfig.lang || 'en', lang: siteConfig.lang || 'en',
path: siteConfig.path || '/', pathData: './data',
pathRepo: './repo', pathContent: './content',
port: siteConfig.port || 80, port: siteConfig.port || 80,
public: (siteConfig.public === true), public: (siteConfig.public === true),
selfRegister: (siteConfig.selfRegister === true), selfRegister: (siteConfig.selfRegister === true),
...@@ -418,75 +359,19 @@ export default { ...@@ -418,75 +359,19 @@ export default {
title: siteConfig.title || 'Wiki', title: siteConfig.title || 'Wiki',
upgrade: false, upgrade: false,
upgMongo: 'mongodb://' upgMongo: 'mongodb://'
},
considerations: {
https: false,
port: false,
localhost: false
}
}
},
computed: {
currentProgress: function () {
let perc = '0%'
switch (this.state) {
case 'welcome':
perc = '0%'
break
case 'syscheck':
perc = (this.syscheck.ok) ? '15%' : '5%'
break
case 'general':
perc = '25%'
break
case 'considerations':
perc = '30%'
break
case 'git':
perc = '50%'
break
case 'gitcheck':
perc = (this.gitcheck.ok) ? '70%' : '55%'
break
case 'admin':
perc = '75%'
break
case 'upgrade':
perc = '85%'
break
} }
return perc
} }
}, },
mounted: function () {
/* if (appconfig.paths) {
this.conf.pathData = appconfig.paths.data || './data'
this.conf.pathRepo = appconfig.paths.repo || './repo'
}
if (appconfig.git !== false && _.isPlainObject(appconfig.git)) {
this.conf.gitUrl = appconfig.git.url || ''
this.conf.gitBranch = appconfig.git.branch || 'master'
this.conf.gitShowUserEmail = (appconfig.git.showUserEmail !== false)
this.conf.gitServerEmail = appconfig.git.serverEmail || ''
if (_.isPlainObject(appconfig.git.auth)) {
this.conf.gitAuthType = appconfig.git.auth.type || 'ssh'
this.conf.gitAuthSSHKey = appconfig.git.auth.privateKey || ''
this.conf.gitAuthUser = appconfig.git.auth.username || ''
this.conf.gitAuthPass = appconfig.git.auth.password || ''
this.conf.gitAuthSSL = (appconfig.git.auth.sslVerify !== false)
}
} */
},
methods: { methods: {
proceedToWelcome: function (ev) { proceedToWelcome () {
this.state = 'welcome' this.state = 1
this.loading = false this.loading = false
}, },
proceedToSyscheck: function (ev) { proceedToSyscheck () {
let self = this let self = this
this.state = 'syscheck' this.state = 2
this.loading = true this.loading = true
self.syscheck = { this.syscheck = {
ok: false, ok: false,
error: '', error: '',
results: [] results: []
...@@ -508,90 +393,60 @@ export default { ...@@ -508,90 +393,60 @@ export default {
}) })
}, 1000) }, 1000)
}, },
proceedToGeneral: function (ev) { proceedToGeneral () {
let self = this this.state = 3
self.state = 'general' this.loading = false
self.loading = false
self.$nextTick(() => {
self.$validator.validateAll('general')
})
}, },
proceedToConsiderations: function (ev) { async proceedToAdmin () {
this.considerations = { if (this.state < 4) {
https: false, const validationSuccess = await this.$validator.validateAll('general')
port: false, // TODO if (!validationSuccess) {
localhost: false this.state = 3
return
}
} }
this.state = 'considerations' this.state = 4
this.loading = false this.loading = false
}, },
proceedToGit: function (ev) { async proceedToUpgrade () {
let self = this if (this.state < 5) {
self.state = 'git' const validationSuccess = await this.$validator.validateAll('admin')
self.loading = false if (!validationSuccess) {
self.$nextTick(() => { this.state = 4
self.$validator.validateAll('git') return
})
},
proceedToGitCheck: function (ev) {
let self = this
this.state = 'gitcheck'
this.loading = true
self.gitcheck = {
ok: false,
results: [],
error: ''
} }
_.delay(() => {
axios.post('/gitcheck', self.conf).then(resp => {
if (resp.data.ok === true) {
self.gitcheck.ok = true
self.gitcheck.results = resp.data.results
} else {
self.gitcheck.ok = false
self.gitcheck.error = resp.data.error
} }
self.loading = false
self.$nextTick()
}).catch(err => {
window.alert(err.message)
})
}, 1000)
},
proceedToAdmin: function (ev) {
let self = this
self.state = 'admin'
self.loading = false
self.$nextTick(() => {
self.$validator.validateAll('admin')
})
},
proceedToUpgrade: function (ev) {
if (this.conf.upgrade) { if (this.conf.upgrade) {
this.state = 'upgrade' this.state = 5
this.loading = false this.loading = false
this.$nextTick(() => {
this.$validator.validateAll('upgrade')
})
} else { } else {
this.proceedToFinal() this.proceedToFinal()
} }
}, },
proceedToFinal: function (ev) { async proceedToFinal () {
let self = this if (this.conf.upgrade && this.state < 6) {
self.state = 'final' const validationSuccess = await this.$validator.validateAll('upgrade')
self.loading = true if (!validationSuccess) {
self.final = { this.state = 5
return
}
}
this.state = this.conf.upgrade ? 6 : 5
this.loading = true
this.final = {
ok: false, ok: false,
error: '', error: '',
redirectUrl: '' redirectUrl: ''
} }
this.$forceUpdate()
let self = this
_.delay(() => { _.delay(() => {
axios.post('/finalize', self.conf).then(resp => { axios.post('/finalize', self.conf).then(resp => {
if (resp.data.ok === true) { if (resp.data.ok === true) {
self.$helpers._.delay(() => { _.delay(() => {
self.final.ok = true self.final.ok = true
switch (resp.data.redirectPort) { switch (resp.data.redirectPort) {
case 80: case 80:
...@@ -617,10 +472,14 @@ export default { ...@@ -617,10 +472,14 @@ export default {
}) })
}, 1000) }, 1000)
}, },
finish: function (ev) { finish () {
window.location.assign(this.final.redirectUrl) window.location.assign(this.final.redirectUrl)
} }
} }
} }
</script> </script>
<style lang='scss'>
</style>
...@@ -9,8 +9,6 @@ ...@@ -9,8 +9,6 @@
@import 'components/button'; @import 'components/button';
@import 'components/markdown-content'; @import 'components/markdown-content';
@import 'components/navigator'; @import 'components/navigator';
@import 'components/panel';
@import 'components/setup';
@import 'components/toggle'; @import 'components/toggle';
@import 'components/typography'; @import 'components/typography';
......
...@@ -20,17 +20,6 @@ html { ...@@ -20,17 +20,6 @@ html {
} }
} }
// body {
// background-color: lighten(mc('blue-grey','50'), 5%);
// height: 100%;
// }
// main {
// background-color: mc('blue','500');
// background-image: linear-gradient(to bottom, mc('blue', '700') 0%, mc('blue', '500') 100%);
// padding: 50px;
// min-height: 100vh;
// }
// Container // Container
.container { .container {
......
.setup {
background-color: #1565c0;
background-image: url('../static/svg/config-bg.svg');
width: 100%;
min-height: 100vh;
padding-top: 1rem;
.welcome {
text-align: center;
padding: 1rem 0 2rem 0;
border-bottom: 1px solid mc('blue', '50');
margin-bottom: 1rem;
img {
max-height: 100px;
}
h2 {
margin: 0;
color: mc('indigo', '700');
font-weight: 500;
}
}
.is-logo {
text-align: center;
padding: .5rem 0 1.5rem 0;
border-bottom: 1px solid mc('blue', '50');
margin-bottom: 1rem;
display: flex;
justify-content: center;
align-items: center;
img {
max-height: 64px;
}
h4 {
font-size: 1.2rem;
font-weight: 600;
margin-left: 1.5rem;
color: mc('grey', '700');
}
}
i.icon-loader {
display: inline-block;
color: mc('blue', '500')
}
.progress-bar {
width: 150px;
height: 10px;
background-color: mc('indigo', '50');
border:1px solid mc('indigo', '100');
border-radius: 3px;
position: absolute;
left: 15px;
top: 21px;
padding: 1px;
> div {
width: 5px;
height: 6px;
background-color: mc('indigo', '200');
border-radius: 2px;
transition: all 1s ease;
}
}
footer {
background-color: mc('blue','800');
border-top: 1px solid mc('blue', '700');
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 25px;
height: 70px;
font-size: 13px;
font-weight: 500;
color: mc('blue','200');
position: absolute;
right: 0;
bottom: 0;
left: 0;
}
}
...@@ -15,7 +15,7 @@ port: 80 ...@@ -15,7 +15,7 @@ port: 80
# --------------------------------------------------------------------- # ---------------------------------------------------------------------
paths: paths:
repo: ./repo content: ./content
data: ./data data: ./data
# --------------------------------------------------------------------- # ---------------------------------------------------------------------
......
...@@ -42,7 +42,6 @@ defaults: ...@@ -42,7 +42,6 @@ defaults:
enabled: true enabled: true
site: site:
lang: en lang: en
path: ''
rtl: false rtl: false
title: Wiki.js title: Wiki.js
# System defaults # System defaults
...@@ -103,36 +102,47 @@ langs: ...@@ -103,36 +102,47 @@ langs:
- -
id: en id: en
name: English name: English
original: English
- -
id: zh id: zh
name: Chinese - 中文 name: Chinese
original: 中文
- -
id: nl id: nl
name: Dutch - Nederlands name: Dutch
original: Nederlands
- -
id: fr id: fr
name: French - Français name: French
original: Français
- -
id: de id: de
name: German - Deutsch name: German
original: Deutsch
- -
id: ja id: ja
name: Japanese - 日本語 name: Japanese
original: 日本語
- -
id: ko id: ko
name: Korean - 한국어 name: Korean
original: 한국어
- -
id: fa id: fa
name: Persian (Fārsi) - فارسی name: Persian (Fārsi)
original: فارسی
- -
id: pt id: pt
name: Portuguese - Português name: Portuguese
original: Português
- -
id: ru id: ru
name: Russian - Русский name: Russian
original: Русский
- -
id: es id: es
name: Spanish - Español name: Spanish
original: Español
rtlLangs: rtlLangs:
- fa - fa
# --------------------------------- # ---------------------------------
...@@ -34,8 +34,6 @@ module.exports = () => { ...@@ -34,8 +34,6 @@ module.exports = () => {
let app = express() let app = express()
app.use(compression()) app.use(compression())
let server
// ---------------------------------------- // ----------------------------------------
// Public Assets // Public Assets
// ---------------------------------------- // ----------------------------------------
...@@ -91,14 +89,20 @@ module.exports = () => { ...@@ -91,14 +89,20 @@ module.exports = () => {
if (!semver.satisfies(semver.clean(process.version), '>=8.9.0')) { if (!semver.satisfies(semver.clean(process.version), '>=8.9.0')) {
throw new Error('Node.js version is too old. Minimum is 8.9.0.') throw new Error('Node.js version is too old. Minimum is 8.9.0.')
} }
return 'Node.js ' + process.version + ' detected. Minimum is 8.9.0.' return {
title: 'Node.js ' + process.version + ' detected.',
subtitle: ' Minimum is 8.9.0.'
}
}, },
() => { () => {
return Promise.try(() => { return Promise.try(() => {
require('crypto') require('crypto')
}).catch(err => { }).catch(err => {
throw new Error('Crypto Node.js module is not available.') throw new Error('Crypto Node.js module is not available.')
}).return('Node.js Crypto module is available.') }).return({
title: 'Node.js Crypto module is available.',
subtitle: 'Crypto module is required.'
})
}, },
() => { () => {
const exec = require('child_process').exec const exec = require('child_process').exec
...@@ -112,16 +116,22 @@ module.exports = () => { ...@@ -112,16 +116,22 @@ module.exports = () => {
if (!gitver || !semver.satisfies(semver.clean(gitver), '>=2.7.4')) { if (!gitver || !semver.satisfies(semver.clean(gitver), '>=2.7.4')) {
reject(new Error('Git version is too old. Minimum is 2.7.4.')) reject(new Error('Git version is too old. Minimum is 2.7.4.'))
} }
resolve('Git ' + gitver + ' detected. Minimum is 2.7.4.') resolve({
title: 'Git ' + gitver + ' detected.',
subtitle: 'Minimum is 2.7.4.'
})
}) })
}) })
}, },
() => { () => {
const os = require('os') const os = require('os')
if (os.totalmem() < 1000 * 1000 * 512) { if (os.totalmem() < 1000 * 1000 * 768) {
throw new Error('Not enough memory. Minimum is 512 MB.') throw new Error('Not enough memory. Minimum is 768 MB.')
}
return {
title: filesize(os.totalmem()) + ' of system memory available.',
subtitle: 'Minimum is 768 MB.'
} }
return filesize(os.totalmem()) + ' of system memory available. Minimum is 512 MB.'
}, },
() => { () => {
let fs = require('fs') let fs = require('fs')
...@@ -129,7 +139,10 @@ module.exports = () => { ...@@ -129,7 +139,10 @@ module.exports = () => {
fs.accessSync(path.join(WIKI.ROOTPATH, 'config.yml'), (fs.constants || fs).W_OK) fs.accessSync(path.join(WIKI.ROOTPATH, 'config.yml'), (fs.constants || fs).W_OK)
}).catch(err => { }).catch(err => {
throw new Error('config.yml file is not writable by Node.js process or was not created properly.') throw new Error('config.yml file is not writable by Node.js process or was not created properly.')
}).return('config.yml is writable by the setup process.') }).return({
title: 'config.yml is writable by the setup process.',
subtitle: 'Setup will write to this file.'
})
} }
], test => test()).then(results => { ], test => test()).then(results => {
res.json({ ok: true, results }) res.json({ ok: true, results })
...@@ -251,13 +264,14 @@ module.exports = () => { ...@@ -251,13 +264,14 @@ module.exports = () => {
let conf = yaml.safeLoad(confRaw) let conf = yaml.safeLoad(confRaw)
conf.port = req.body.port conf.port = req.body.port
conf.paths.repo = req.body.pathRepo conf.paths.data = req.body.pathData
conf.paths.content = req.body.pathContent
confRaw = yaml.safeDump(conf) confRaw = yaml.safeDump(conf)
await fs.writeFileAsync(path.join(WIKI.ROOTPATH, 'config.yml'), confRaw) await fs.writeFileAsync(path.join(WIKI.ROOTPATH, 'config.yml'), confRaw)
_.set(WIKI.config, 'port', req.body.port) _.set(WIKI.config, 'port', req.body.port)
_.set(WIKI.config, 'paths.repo', req.body.pathRepo) _.set(WIKI.config, 'paths.content', req.body.pathContent)
// Populate config namespaces // Populate config namespaces
WIKI.config.auth = WIKI.config.auth || {} WIKI.config.auth = WIKI.config.auth || {}
...@@ -270,7 +284,6 @@ module.exports = () => { ...@@ -270,7 +284,6 @@ module.exports = () => {
// Site namespace // Site namespace
_.set(WIKI.config.site, 'title', req.body.title) _.set(WIKI.config.site, 'title', req.body.title)
_.set(WIKI.config.site, 'path', req.body.path)
_.set(WIKI.config.site, 'lang', req.body.lang) _.set(WIKI.config.site, 'lang', req.body.lang)
_.set(WIKI.config.site, 'rtl', _.includes(WIKI.data.rtlLangs, req.body.lang)) _.set(WIKI.config.site, 'rtl', _.includes(WIKI.data.rtlLangs, req.body.lang))
_.set(WIKI.config.site, 'sessionSecret', (await crypto.randomBytesAsync(32)).toString('hex')) _.set(WIKI.config.site, 'sessionSecret', (await crypto.randomBytesAsync(32)).toString('hex'))
...@@ -280,32 +293,6 @@ module.exports = () => { ...@@ -280,32 +293,6 @@ module.exports = () => {
_.set(WIKI.config.auth, 'strategies.local.enabled', true) _.set(WIKI.config.auth, 'strategies.local.enabled', true)
_.set(WIKI.config.auth, 'strategies.local.allowSelfRegister', req.body.selfRegister === 'true') _.set(WIKI.config.auth, 'strategies.local.allowSelfRegister', req.body.selfRegister === 'true')
// Git namespace
_.set(WIKI.config.git, 'enabled', req.body.gitUseRemote === 'true')
if (WIKI.config.git.enabled) {
_.set(WIKI.config.git, 'url', req.body.gitUrl)
_.set(WIKI.config.git, 'branch', req.body.gitBranch)
_.set(WIKI.config.git, 'author.defaultEmail', req.body.gitServerEmail)
_.set(WIKI.config.git, 'author.useUserEmail', req.body.gitShowUserEmail)
_.set(WIKI.config.git, 'sslVerify', req.body.gitAuthSSL === 'true')
_.set(WIKI.config.git, 'auth.type', req.body.gitAuthType)
switch (WIKI.config.git.auth.type) {
case 'basic':
_.set(WIKI.config.git, 'auth.user', req.body.gitAuthUser)
_.set(WIKI.config.git, 'auth.pass', req.body.gitAuthPass)
break
case 'ssh':
_.set(WIKI.config.git, 'auth.keyPath', req.body.gitAuthSSHKey)
break
case 'sshenv':
_.set(WIKI.config.git, 'auth.keyEnv', req.body.gitAuthSSHKeyEnv)
break
case 'sshdb':
_.set(WIKI.config.git, 'auth.keyContents', req.body.gitAuthSSHKeyDB)
break
}
}
// Logging namespace // Logging namespace
WIKI.config.logging.telemetry = (req.body.telemetry === 'true') WIKI.config.logging.telemetry = (req.body.telemetry === 'true')
...@@ -332,7 +319,7 @@ module.exports = () => { ...@@ -332,7 +319,7 @@ module.exports = () => {
}).end() }).end()
WIKI.logger.info('Stopping Setup...') WIKI.logger.info('Stopping Setup...')
server.destroy(() => { WIKI.server.destroy(() => {
WIKI.logger.info('Setup stopped. Starting WIKI.js...') WIKI.logger.info('Setup stopped. Starting WIKI.js...')
_.delay(() => { _.delay(() => {
WIKI.kernel.bootMaster() WIKI.kernel.bootMaster()
......
...@@ -2,5 +2,5 @@ extends ../master.pug ...@@ -2,5 +2,5 @@ extends ../master.pug
block body block body
body body
#app.setup.is-fullscreen #app
setup(telemetry-id=telemetryClientID, wiki-version=packageObj.version, :langs!=JSON.stringify(data.langs).replace(/"/g, "'")) setup(telemetry-id=telemetryClientID, wiki-version=packageObj.version, :langs!=JSON.stringify(data.langs).replace(/"/g, "'"))
...@@ -3,34 +3,34 @@ html ...@@ -3,34 +3,34 @@ html
head head
meta(http-equiv='X-UA-Compatible', content='IE=edge') meta(http-equiv='X-UA-Compatible', content='IE=edge')
meta(charset='UTF-8') meta(charset='UTF-8')
meta(name='viewport', content='width=device-width, initial-scale=1') meta(name='viewport', content='user-scalable=yes, width=device-width, initial-scale=1, maximum-scale=5')
meta(name='theme-color', content='#0288d1') meta(name='theme-color', content='#333333')
meta(name='msapplication-TileColor', content='#0288d1') meta(name='msapplication-TileColor', content='#333333')
meta(name='msapplication-TileImage', content=config.site.path + 'favicons/ms-icon-144x144.png') meta(name='msapplication-TileImage', content='/favicons/ms-icon-144x144.png')
title= config.site.title title= config.site.title
//- Favicon //- Favicon
each favsize in [57, 60, 72, 76, 114, 120, 144, 152, 180] each favsize in [57, 60, 72, 76, 114, 120, 144, 152, 180]
link(rel='apple-touch-icon', sizes=favsize + 'x' + favsize, href=config.site.path + 'favicons/apple-icon-' + favsize + 'x' + favsize + '.png') link(rel='apple-touch-icon', sizes=favsize + 'x' + favsize, href='/favicons/apple-icon-' + favsize + 'x' + favsize + '.png')
link(rel='icon', type='image/png', sizes='192x192', href=config.site.path + 'favicons/android-icon-192x192.png') link(rel='icon', type='image/png', sizes='192x192', href='/favicons/android-icon-192x192.png')
each favsize in [32, 96, 16] each favsize in [32, 96, 16]
link(rel='icon', type='image/png', sizes=favsize + 'x' + favsize, href=config.site.path + 'favicons/favicon-' + favsize + 'x' + favsize + '.png') link(rel='icon', type='image/png', sizes=favsize + 'x' + favsize, href='/favicons/favicon-' + favsize + 'x' + favsize + '.png')
link(rel='manifest', href=config.site.path + 'manifest.json') link(rel='manifest', href='/manifest.json')
//- Site Lang //- Site Lang
script. script.
var siteConfig = !{JSON.stringify(config.site)} var siteConfig = !{JSON.stringify(config.site)}
//- CSS //- CSS
link(type='text/css', rel='stylesheet', href=config.site.path + 'css/bundle.css') link(type='text/css', rel='stylesheet', href='/css/bundle.css')
link(type='text/css', rel='stylesheet', href='https://fonts.googleapis.com/icon?family=Roboto:400,500,700|Source+Code+Pro:400,700|Material+Icons') link(type='text/css', rel='stylesheet', href='https://fonts.googleapis.com/icon?family=Roboto:400,500,700|Source+Code+Pro:400,700|Material+Icons')
link(type='text/css', rel='stylesheet', href='https://cdnjs.cloudflare.com/ajax/libs/material-design-iconic-font/2.2.0/css/material-design-iconic-font.min.css') link(type='text/css', rel='stylesheet', href='https://cdnjs.cloudflare.com/ajax/libs/material-design-iconic-font/2.2.0/css/material-design-iconic-font.min.css')
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/material-design-iconic-font/2.2.0/css/material-design-iconic-font.min.css" /> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/material-design-iconic-font/2.2.0/css/material-design-iconic-font.min.css" />
//- JS //- JS
script(type='text/javascript', src=config.site.path + 'js/runtime.js') script(type='text/javascript', src='/js/runtime.js')
script(type='text/javascript', src=config.site.path + 'js/vendor.js') script(type='text/javascript', src='/js/vendor.js')
script(type='text/javascript', src=config.site.path + 'js/client.js') script(type='text/javascript', src='/js/client.js')
block head block head
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment