You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

354 lines
24 KiB

  1. extends master.pug
  2. block body
  3. body
  4. #app.setup
  5. setup(inline-template)
  6. div
  7. .container
  8. .content(v-cloak)
  9. //- ==============================================
  10. //- WELCOME
  11. //- ==============================================
  12. template(v-if='state === "welcome"')
  13. .panel
  14. h2.panel-title.is-featured
  15. span Welcome!
  16. i(v-if='loading')
  17. .panel-content.is-text
  18. .welcome
  19. img(src='svg/logo-wikijs.svg', alt='Wiki.js Logo')
  20. h2 A modern, lightweight and powerful wiki app built on NodeJS, Git and Markdown
  21. p This installation wizard will guide you through the steps needed to get your wiki up and running in no time!
  22. 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].
  23. .panel-content.form-sections
  24. section
  25. p
  26. svg.icons.is-18.is-outlined.has-right-pad.is-text: use(xlink:href='#nc-cd-reader')
  27. span You are about to install Wiki.js #[strong= packageObj.version].
  28. section
  29. p.control.is-fullwidth
  30. input#ipt-telemetry(type='checkbox', v-model='conf.telemetry', name='ipt-telemetry')
  31. label.label(for='ipt-telemetry') Allow Telemetry
  32. span.desc Help Wiki.js developers improve this app with anonymized #[a(href='https://wiki.requarks.io/docs/telemetry') telemetry].
  33. p.control.is-fullwidth
  34. input#ipt-upgrade(type='checkbox', v-model='conf.upgrade', name='ipt-upgrade')
  35. label.label(for='ipt-upgrade') Upgrade from Wiki.js 1.x
  36. span.desc Check this box if you are upgrading from Wiki.js 1.x and wish to migrate your existing data.
  37. .panel-footer
  38. .progress-bar: div(v-bind:style='{width: currentProgress}')
  39. button.button.is-small.is-light-blue(v-on:click='proceedToSyscheck', v-bind:disabled='loading') Start
  40. //- ==============================================
  41. //- SYSTEM CHECK
  42. //- ==============================================
  43. template(v-else-if='state === "syscheck"')
  44. .panel
  45. h2.panel-title.is-featured
  46. span Wiki.js
  47. i(v-if='loading')
  48. .panel-content.is-text
  49. .is-logo
  50. svg.icons.is-64: use(xlink:href='#nc-metrics')
  51. h4 System Check
  52. p(v-if='loading') #[svg.icons.is-24.is-text: use(xlink:href='#wk-msdots')] Checking your system for compatibility...
  53. p(v-if='!loading && syscheck.ok')
  54. ul
  55. li(v-for='rs in syscheck.results') #[svg.icons.is-18.is-text: use(xlink:href='#nc-check-bold')] {{rs}}
  56. p(v-if='!loading && syscheck.ok')
  57. svg.icons.is-18.is-text: use(xlink:href='#nc-check-bold')
  58. strong Looks good! No issues so far.
  59. p(v-if='!loading && !syscheck.ok') #[svg.icons.is-18.is-text: use(xlink:href='#nc-square-remove-12')] Error: {{ syscheck.error }}
  60. .panel-footer
  61. .progress-bar: div(v-bind:style='{width: currentProgress}')
  62. button.button.is-small.is-light-blue.is-outlined(v-on:click='proceedToWelcome', v-bind:disabled='loading') Back
  63. button.button.is-small.is-teal(v-on:click='proceedToSyscheck', v-if='!loading && !syscheck.ok') Check Again
  64. button.button.is-small.is-red.is-outlined(v-on:click='proceedToGeneral', v-if='!loading && !syscheck.ok') Continue Anyway
  65. button.button.is-small.is-light-blue(v-on:click='proceedToGeneral', v-if='loading || syscheck.ok', v-bind:disabled='loading') Continue
  66. //- ==============================================
  67. //- GENERAL
  68. //- ==============================================
  69. template(v-else-if='state === "general"')
  70. .panel
  71. h2.panel-title.is-featured
  72. span Wiki.js
  73. i(v-if='loading')
  74. .panel-content.form-sections
  75. section
  76. .is-logo
  77. svg.icons.is-64: use(xlink:href='#nc-webpage')
  78. h4 General Information
  79. p.control.is-fullwidth
  80. label.label Site Title
  81. input(type='text', placeholder='e.g. Wiki', v-model='conf.title', data-vv-scope='general', name='ipt-title', v-validate='{ required: true, min: 2 }')
  82. span.desc The site title will appear in the top left corner on every page and within the window title bar.
  83. section.columns
  84. .column.is-half
  85. p.control
  86. label.label Site UI Language
  87. select(v-model='conf.lang')
  88. each lg in data.langs
  89. option(value=lg.id)= lg.name
  90. span.desc The language in which navigation, help and other UI elements will be displayed.
  91. .column.is-half
  92. p.control.is-fullwidth
  93. label.label Site Relative URL Path
  94. input(type='text', placeholder='/', v-model='conf.path', data-vv-scope='general', name='ipt-path', v-validate='{ required: true, min: 1 }')
  95. 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].
  96. section.columns
  97. .column.is-half
  98. p.control
  99. label.label Server Port
  100. input(type='text', placeholder='e.g. 80', v-model.number='conf.port', data-vv-scope='general', name='ipt-port', v-validate='{ required: true }')
  101. 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.
  102. .column.is-half
  103. p.control.is-fullwidth
  104. input#ipt-public(type='checkbox', v-model='conf.public', data-vv-scope='general', name='ipt-public')
  105. label.label(for='ipt-public') Public Access
  106. span.desc Should the site be accessible (read only) without login.
  107. p.control.is-fullwidth
  108. input#ipt-selfregister(type='checkbox', v-model='conf.selfRegister', data-vv-scope='general', name='ipt-selfregister')
  109. label.label(for='ipt-selfregister') Allow Self-Registration
  110. span.desc Can users create their own account to gain access?
  111. section
  112. p.control.is-fullwidth
  113. label.label Local Server Repository Path
  114. input(type='text', placeholder='e.g. ./repo', v-model='conf.pathRepo', data-vv-scope='general', name='ipt-repopath', v-validate='{ required: true, min: 2 }')
  115. 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].
  116. .panel-footer
  117. .progress-bar: div(v-bind:style='{width: currentProgress}')
  118. button.button.is-small.is-light-blue.is-outlined(v-on:click='proceedToSyscheck', v-bind:disabled='loading') Back
  119. button.button.is-small.is-light-blue(v-on:click='proceedToConsiderations', v-bind:disabled='loading || errors.any("general")') Continue
  120. //- ==============================================
  121. //- CONSIDERATIONS
  122. //- ==============================================
  123. template(v-else-if='state === "considerations"')
  124. .panel
  125. h2.panel-title.is-featured
  126. span Wiki.js
  127. i(v-if='loading')
  128. .panel-content.is-text
  129. .is-logo
  130. svg.icons.is-64: use(xlink:href='#nc-radar')
  131. h4 Important Considerations
  132. h3 Is Wiki.js going to be behind a web server (e.g. nginx / apache / IIS) or proxy?
  133. p
  134. ul
  135. li - Make sure the upload limit is sufficient. Most web servers have a low limit (e.g. 2 MB) by default.
  136. li - Do not rewrite URLs after the domain. This can cause unexpected issues in Wiki.js navigation.
  137. li - Do not remove or alter the client IP when proxying the requests. This can cause the authentication brute force protection to engage unexpectedly.
  138. template(v-if='considerations.https')
  139. h3 The site will not be using HTTPS? #[svg.icons.is-20.is-outlined.animated.fadeOut.infinite: use(xlink:href='#nc-alert')]
  140. 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.
  141. template(v-if='considerations.port')
  142. h3 You are using a non-standard port.
  143. 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.
  144. .panel-footer
  145. .progress-bar: div(v-bind:style='{width: currentProgress}')
  146. button.button.is-small.is-light-blue.is-outlined(v-on:click='proceedToGeneral', v-bind:disabled='loading') Back
  147. button.button.is-small.is-light-blue(v-on:click='proceedToGit', v-bind:disabled='loading') Continue
  148. //- ==============================================
  149. //- GIT
  150. //- ==============================================
  151. template(v-else-if='state === "git"')
  152. .panel
  153. h2.panel-title.is-featured
  154. span Wiki.js
  155. i(v-if='loading')
  156. .panel-content.is-text
  157. .is-logo
  158. img(src='svg/logo-git.svg', alt='Git Logo')
  159. h4 Git Repository
  160. 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.
  161. .panel-content.form-sections
  162. section.columns
  163. .column.is-two-thirds
  164. p.control.is-fullwidth
  165. label.label Repository URL
  166. 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 }')
  167. span.desc The full git repository URL to connect to.
  168. .column
  169. p.control.is-fullwidth
  170. label.label Branch
  171. input(type='text', placeholder='e.g. master', v-model='conf.gitBranch', data-vv-scope='git', name='ipt-gitbranch', v-validate='{ required: true, min: 2 }')
  172. span.desc The git branch to use when synchronizing changes.
  173. section.columns
  174. .column.is-one-third
  175. p.control.is-fullwidth
  176. label.label Authentication
  177. select(v-model='conf.gitAuthType')
  178. option(value='ssh') SSH using Private Key file (recommended)
  179. option(value='sshenv') SSH using Private Key in environment variable
  180. option(value='sshdb') SSH using Private Key in database
  181. option(value='basic') Basic Credentials
  182. span.desc The authentication method used to connect to your remote Git repository.
  183. p.control.is-fullwidth
  184. input#ipt-git-verify-ssl(type='checkbox', v-model='conf.gitAuthSSL')
  185. label.label(for='ipt-git-verify-ssl') Verify SSL
  186. .column(v-show='conf.gitAuthType === "basic"')
  187. p.control.is-fullwidth
  188. label.label Username
  189. input(type='text', v-model='conf.gitAuthUser')
  190. span.desc The username for the remote git connection.
  191. .column(v-show='conf.gitAuthType === "basic"')
  192. p.control.is-fullwidth
  193. label.label Password
  194. input(type='password', v-model='conf.gitAuthPass')
  195. span.desc The password for the remote git connection.
  196. .column(v-show='conf.gitAuthType === "ssh"')
  197. p.control.is-fullwidth
  198. label.label Private Key location
  199. input(type='text', placeholder='e.g. /etc/wiki/keys/git.pem', v-model='conf.gitAuthSSHKey')
  200. span.desc The full path to the #[strong unencrypted] private key on disk.
  201. .column(v-show='conf.gitAuthType === "sshenv"')
  202. p.control.is-fullwidth
  203. label.label Private Key Environment Variable
  204. input(type='text', placeholder='e.g. GIT_PRIVATE_KEY', v-model='conf.gitAuthSSHKeyEnv')
  205. span.desc The environment variable containing the private key.
  206. .column(v-show='conf.gitAuthType === "sshdb"')
  207. p.control.is-fullwidth
  208. label.label Private Key Contents
  209. textarea(v-model='conf.gitAuthSSHKeyDB')
  210. span.desc Paste the contents of the private key in the above field
  211. section.columns
  212. .column.is-one-third
  213. p.control.is-fullwidth
  214. input#ipt-git-show-user-email(type='checkbox', v-model='conf.gitShowUserEmail')
  215. label.label(for='ipt-git-show-user-email') Commit using User Email
  216. 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.
  217. .column
  218. p.control.is-fullwidth
  219. label.label Default Commit Author Email
  220. 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 }')
  221. span.desc The default/fallback email to use when creating commits to the git repository.
  222. .panel-footer
  223. .progress-bar: div(v-bind:style='{width: currentProgress}')
  224. button.button.is-small.is-light-blue.is-outlined(v-on:click='proceedToGeneral', v-bind:disabled='loading') Back
  225. button.button.is-small.is-light-blue.is-outlined(v-on:click='conf.gitUseRemote = false; proceedToGitCheck()', v-bind:disabled='loading') Skip this step
  226. button.button.is-small.is-light-blue(v-on:click='conf.gitUseRemote = true; proceedToGitCheck()', v-bind:disabled='loading || errors.any("git")') Continue
  227. //- ==============================================
  228. //- GIT CHECK
  229. //- ==============================================
  230. template(v-else-if='state === "gitcheck"')
  231. .panel
  232. h2.panel-title.is-featured
  233. span Wiki.js
  234. i(v-if='loading')
  235. .panel-content.is-text
  236. .is-logo
  237. img(src='svg/logo-git.svg', alt='Git Logo')
  238. h4 Git Repository Check
  239. p(v-if='loading') #[svg.icons.is-24.is-text: use(xlink:href='#wk-msdots')] Verifying Git repository settings...
  240. p(v-if='!loading && gitcheck.ok')
  241. ul
  242. li(v-for='rs in gitcheck.results') #[svg.icons.is-18.is-text: use(xlink:href='#nc-check-bold')] {{rs}}
  243. p(v-if='!loading && gitcheck.ok')
  244. svg.icons.is-18.is-text: use(xlink:href='#nc-check-bold')
  245. strong Git settings are correct!
  246. p(v-if='!loading && !gitcheck.ok') #[svg.icons.is-18.is-text: use(xlink:href='#nc-square-remove')] Error: {{ gitcheck.error }}
  247. .panel-footer
  248. .progress-bar: div(v-bind:style='{width: currentProgress}')
  249. button.button.is-small.is-light-blue.is-outlined(v-on:click='proceedToGit', v-bind:disabled='loading') Back
  250. button.button.is-small.is-teal(v-on:click='proceedToGitCheck', v-if='!loading && !gitcheck.ok') Try Again
  251. button.button.is-small.is-light-blue(v-on:click='proceedToAdmin', v-if='loading || gitcheck.ok', v-bind:disabled='loading') Continue
  252. //- ==============================================
  253. //- ADMINISTRATOR ACCOUNT
  254. //- ==============================================
  255. template(v-else-if='state === "admin"')
  256. .panel
  257. h2.panel-title.is-featured
  258. span Wiki.js
  259. i(v-if='loading')
  260. .panel-content.is-text
  261. .is-logo
  262. svg.icons.is-64: use(xlink:href='#nc-man')
  263. h4 Administrator Account
  264. p A root administrator account will be created for local authentication. From this account, you can create or authorize more users.
  265. .panel-content.form-sections
  266. section
  267. p.control.is-fullwidth
  268. label.label Administrator Email
  269. 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 }')
  270. span.desc The email address of the administrator account
  271. section.columns
  272. .column
  273. p.control.is-fullwidth
  274. label.label Password
  275. input(type='password', v-model='conf.adminPassword', data-vv-scope='admin', name='ipt-adminpwd', v-validate='{ required: true, min: 8 }')
  276. span.desc At least 8 characters long.
  277. .column
  278. p.control.is-fullwidth
  279. label.label Confirm Password
  280. input(type='password', v-model='conf.adminPasswordConfirm', data-vv-scope='admin', name='ipt-adminpwd2', v-validate='{ required: true, confirmed: "ipt-adminpwd" }')
  281. span.desc Verify your password again.
  282. .panel-footer
  283. .progress-bar: div(v-bind:style='{width: currentProgress}')
  284. button.button.is-small.is-light-blue.is-outlined(v-on:click='proceedToGit', v-bind:disabled='loading') Back
  285. button.button.is-small.is-light-blue(v-on:click='proceedToUpgrade', v-bind:disabled='loading || errors.any("admin")') Continue
  286. //- ==============================================
  287. //- UPGRADE FROM 1.x
  288. //- ==============================================
  289. template(v-else-if='state === "upgrade"')
  290. .panel
  291. h2.panel-title.is-featured
  292. span Wiki.js
  293. i(v-if='loading')
  294. .panel-content.is-text
  295. .is-logo
  296. svg.icons.is-64: use(xlink:href='#nc-spaceship')
  297. h4 Upgrade from Wiki.js 1.x
  298. p Migrating from a Wiki.js 1.x installation is quick and simple.
  299. .panel-content.form-sections
  300. section
  301. p.control.is-fullwidth
  302. label.label Connection String to Wiki.js 1.x MongoDB database
  303. input(type='text', placeholder='mongodb://', v-model='conf.upgMongo', data-vv-scope='upgrade', name='ipt-mongo', v-validate='{ required: true, min: 2 }')
  304. 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. ]
  305. .panel-footer
  306. .progress-bar: div(v-bind:style='{width: currentProgress}')
  307. button.button.is-small.is-light-blue.is-outlined(v-on:click='proceedToAdmin', v-bind:disabled='loading') Back
  308. button.button.is-small.is-light-blue(v-on:click='proceedToFinal', v-bind:disabled='loading || errors.any("general")') Continue
  309. //- ==============================================
  310. //- FINAL
  311. //- ==============================================
  312. template(v-else-if='state === "final"')
  313. .panel
  314. h2.panel-title.is-featured
  315. span Wiki.js
  316. i(v-if='loading')
  317. .panel-content.is-text
  318. .is-logo(v-if='loading')
  319. svg.icons.is-64: use(xlink:href='#wk-msdots')
  320. h4 Finalizing your installation...
  321. .is-logo(v-if='!loading && final.ok')
  322. svg.icons.is-64: use(xlink:href='#nc-check-bold')
  323. h4 Installation complete!
  324. p(v-if='!loading && final.ok'): strong Wiki.js was configured successfully and is now ready for use.
  325. p(v-if='!loading && final.ok') Click the #[strong Start] button below to access your newly configured wiki.
  326. p(v-if='!loading && !final.ok') #[svg.icons.is-18.is-text: use(xlink:href='#nc-square-remove')] Error: {{ final.error }}
  327. .panel-footer
  328. .progress-bar: div(v-bind:style='{width: currentProgress}')
  329. button.button.is-small.is-light-blue.is-outlined(v-on:click='proceedToAdmin', v-if='!loading && !final.ok', v-bind:disabled='loading') Back
  330. button.button.is-small.is-teal(v-on:click='proceedToFinal', v-if='!loading && !final.ok') Try Again
  331. button.button.is-small.is-green(v-on:click='finish', v-if='loading || final.ok', v-bind:disabled='loading') Start
  332. footer
  333. small Wiki.js Installation Wizard
  334. small(v-if='conf.telemetry') Telemetry Client ID: !{telemetryClientID}