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.

385 lines
24 KiB

  1. doctype html
  2. html(data-logic='configure')
  3. head
  4. meta(http-equiv='X-UA-Compatible', content='IE=edge')
  5. meta(charset='UTF-8')
  6. title Wiki.js | Configure
  7. // Favicon
  8. each favsize in [32, 96, 16]
  9. link(rel='icon', type='image/png', sizes=favsize + 'x' + favsize, href='/favicons/favicon-' + favsize + 'x' + favsize + '.png')
  10. // JS / CSS
  11. script(type='text/javascript').
  12. var appconfig = !{JSON.stringify(conf)};
  13. var runmode = !{JSON.stringify(runmode)};
  14. script(type='text/javascript', src='/js/configure.min.js')
  15. body
  16. #root
  17. #header-container
  18. nav.nav#header
  19. .nav-left
  20. a.nav-item
  21. h1
  22. i.icon-layers
  23. | Wiki.js
  24. main
  25. .container
  26. transition(name='tst-welcome')
  27. .welcome(v-if='state === "welcome" || state === "restart"')
  28. img(src='/images/logo.png', alt='Wiki.js')
  29. h2 A modern, lightweight and powerful wiki app built on NodeJS, Git and Markdown
  30. .content(v-cloak)
  31. //- ==============================================
  32. //- WELCOME
  33. //- ==============================================
  34. template(v-if='state === "welcome"')
  35. .panel
  36. h2.panel-title.is-featured
  37. span Welcome!
  38. i(v-if='loading')
  39. .panel-content.is-text
  40. p This installation wizard will guide you through the steps needed to get your wiki up and running in no time!
  41. p Detailed information about installation and usage can be found on the #[a(href='https://docs.wiki.requarks.io/') 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].
  42. .panel-footer
  43. .progress-bar: div(v-bind:style='{width: currentProgress}')
  44. button.button.is-light-blue(v-on:click='proceedToSyscheck', v-bind:disabled='loading') Start
  45. //- ==============================================
  46. //- SYSTEM CHECK
  47. //- ==============================================
  48. template(v-else-if='state === "syscheck"')
  49. .panel
  50. h2.panel-title.is-featured
  51. span System Check
  52. i(v-if='loading')
  53. .panel-content.is-text
  54. p(v-if='loading') #[i.icon-loader.animated.rotateIn.infinite] Checking your system for compatibility...
  55. p(v-if='!loading && syscheck.ok')
  56. ul
  57. li(v-for='rs in syscheck.results') #[i.icon-check] {{rs}}
  58. p(v-if='!loading && syscheck.ok')
  59. i.icon-check
  60. strong Looks good! No issues so far.
  61. p(v-if='!loading && !syscheck.ok') #[i.icon-square-cross] Error: {{ syscheck.error }}
  62. .panel-footer
  63. .progress-bar: div(v-bind:style='{width: currentProgress}')
  64. button.button.is-light-blue.is-outlined(v-on:click='proceedToWelcome', v-bind:disabled='loading') Back
  65. button.button.is-teal(v-on:click='proceedToSyscheck', v-if='!loading && !syscheck.ok') Check Again
  66. button.button.is-light-blue(v-on:click='proceedToGeneral', v-if='loading || syscheck.ok', v-bind:disabled='loading') Continue
  67. //- ==============================================
  68. //- GENERAL
  69. //- ==============================================
  70. template(v-else-if='state === "general"')
  71. .panel
  72. h2.panel-title.is-featured
  73. span General
  74. i(v-if='loading')
  75. .panel-content.form-sections
  76. section
  77. p.control.is-fullwidth
  78. label.label Site Title
  79. input(type='text', placeholder='e.g. Wiki', v-model='conf.title', data-vv-scope='general', name='ipt-title', v-validate='{ required: true, min: 2 }')
  80. span.desc The site title will appear in the top left corner on every page and within the window title bar.
  81. section
  82. p.control.is-fullwidth
  83. label.label Host
  84. input(type='text', placeholder='http://', v-model='conf.host', data-vv-scope='general', name='ipt-host', v-validate='{ required: true, min: 4 }')
  85. span.desc The full URL to your wiki, without the trailing slash. E.g.: http://wiki.domain.com. Note that sub-folders are #[u not supported].
  86. if !runmode.staticPort
  87. section
  88. p.control
  89. label.label Port
  90. input(type='text', placeholder='e.g. 80', v-model.number='conf.port', data-vv-scope='general', name='ipt-port', v-validate='{ required: true }')
  91. 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.<br>Set <strong>$(PORT)</strong> to use PORT environment variable.
  92. section
  93. p.control
  94. label.label Site UI Language
  95. select(v-model='conf.lang')
  96. each lg in langs
  97. option(value=lg.id)= lg.name
  98. span.desc The language in which navigation, help and other UI elements will be displayed.
  99. section
  100. p.control.is-fullwidth
  101. input#ipt-public(type='checkbox', v-model='conf.public', data-vv-scope='general', name='ipt-public')
  102. label.label(for='ipt-public') Public Access
  103. span.desc Should the site be accessible (read only) without login.
  104. .panel-footer
  105. .progress-bar: div(v-bind:style='{width: currentProgress}')
  106. button.button.is-light-blue.is-outlined(v-on:click='proceedToSyscheck', v-bind:disabled='loading') Back
  107. button.button.is-light-blue(v-on:click='proceedToConsiderations', v-bind:disabled='loading || errors.any("general")') Continue
  108. //- ==============================================
  109. //- CONSIDERATIONS
  110. //- ==============================================
  111. template(v-else-if='state === "considerations"')
  112. .panel
  113. h2.panel-title.is-featured
  114. span Important Considerations
  115. i(v-if='loading')
  116. .panel-content.is-text
  117. h3 Is Wiki.js going to be behind a web server (e.g. nginx / apache / IIS) or proxy?
  118. p
  119. ul
  120. li - Make sure the upload limit is sufficient. Most web servers have a low limit (e.g. 2 MB) by default.
  121. li - Make sure your web server is configured to allow web sockets. Wiki.js will fallback to standard XHR queries if not available.
  122. li - Do not rewrite URLs after the domain. This can cause unexpected issues in Wiki.js navigation.
  123. li - Do not remove or alter the client IP when proxying the requests. This can cause the authentication brute force protection to engage unexpectedly.
  124. template(v-if='considerations.https')
  125. h3 The site will not be using HTTPS? #[i.icon-warning-outline.animated.fadeOut.infinite]
  126. 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.
  127. template(v-if='considerations.port')
  128. h3 You are using a non-standard port.
  129. 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.
  130. template(v-if='considerations.localhost')
  131. h3 Are you sure you want to use localhost as the host base URL? #[i.icon-warning-outline.animated.fadeOut.infinite]
  132. p The host URL you specified is localhost. Unless you are a developer running Wiki.js locally on your machine, this is not recommended!
  133. .panel-footer
  134. .progress-bar: div(v-bind:style='{width: currentProgress}')
  135. button.button.is-light-blue.is-outlined(v-on:click='proceedToGeneral', v-bind:disabled='loading') Back
  136. button.button.is-light-blue(v-on:click='proceedToDb', v-bind:disabled='loading') Continue
  137. //- ==============================================
  138. //- DATABASE
  139. //- ==============================================
  140. template(v-else-if='state === "db"')
  141. .panel
  142. h2.panel-title.is-featured
  143. span Database
  144. i(v-if='loading')
  145. .panel-content.is-text
  146. p Wiki.js stores administrative data such as users, permissions and assets metadata in a MongoDB database. Article contents and uploads are <u>not</u> stored in the DB. Instead, they are stored on-disk and synced automatically with a remote git repository of your choice.
  147. .panel-content.form-sections
  148. section
  149. p.control.is-fullwidth
  150. label.label MongoDB Connection String
  151. input(type='text', placeholder='e.g. mongodb://localhost:27017/wiki', v-model='conf.db', data-vv-scope='db', name='ipt-db', v-validate='{ required: true, min: 3 }')
  152. span.desc The connection string to your MongoDB server. Leave the default localhost value if MongoDB is installed on the same server.<br />You can also specify an environment variable as the connection string, e.g. $(MONGO_URI).
  153. .panel-footer
  154. .progress-bar: div(v-bind:style='{width: currentProgress}')
  155. button.button.is-light-blue.is-outlined(v-on:click='proceedToConsiderations', v-bind:disabled='loading') Back
  156. button.button.is-light-blue(v-on:click='proceedToDbcheck', v-bind:disabled='loading || errors.any("db")') Connect
  157. //- ==============================================
  158. //- DATABASE CHECK
  159. //- ==============================================
  160. template(v-else-if='state === "dbcheck"')
  161. .panel
  162. h2.panel-title.is-featured
  163. span Database Check
  164. i(v-if='loading')
  165. .panel-content.is-text
  166. p(v-if='loading') #[i.icon-loader.animated.rotateIn.infinite] Testing the connection to MongoDB...
  167. p(v-if='!loading && dbcheck.ok')
  168. i.icon-check
  169. strong Connected successfully!
  170. p(v-if='!loading && !dbcheck.ok') #[i.icon-square-cross] Error: {{ dbcheck.error }}
  171. .panel-footer
  172. .progress-bar: div(v-bind:style='{width: currentProgress}')
  173. button.button.is-light-blue.is-outlined(v-on:click='proceedToDb', v-bind:disabled='loading') Back
  174. button.button.is-teal(v-on:click='proceedToDbcheck', v-if='!loading && !dbcheck.ok') Try Again
  175. button.button.is-light-blue(v-on:click='proceedToPaths', v-if='loading || dbcheck.ok', v-bind:disabled='loading') Continue
  176. //- ==============================================
  177. //- PATHS
  178. //- ==============================================
  179. template(v-else-if='state === "paths"')
  180. .panel
  181. h2.panel-title.is-featured
  182. span Paths
  183. i(v-if='loading')
  184. .panel-content.is-text
  185. p It is recommended to leave the default values.
  186. .panel-content.form-sections
  187. section
  188. p.control.is-fullwidth
  189. label.label Local Data Path
  190. input(type='text', placeholder='e.g. ./data', v-model='conf.pathData', data-vv-scope='paths', name='ipt-datapath', v-validate='{ required: true, min: 2 }')
  191. span.desc The path where cache (processed content, thumbnails, search index, etc.) will be stored on disk.
  192. section
  193. p.control.is-fullwidth
  194. label.label Local Repository Path
  195. input(type='text', placeholder='e.g. ./repo', v-model='conf.pathRepo', data-vv-scope='paths', name='ipt-repopath', v-validate='{ required: true, min: 2 }')
  196. span.desc The path where the local git repository will be created, used to store content in markdown files and uploads.
  197. .panel-footer
  198. .progress-bar: div(v-bind:style='{width: currentProgress}')
  199. button.button.is-light-blue.is-outlined(v-on:click='proceedToDb', v-bind:disabled='loading') Back
  200. button.button.is-light-blue(v-on:click='proceedToGit', v-bind:disabled='loading || errors.any("paths")') Continue
  201. //- ==============================================
  202. //- GIT
  203. //- ==============================================
  204. template(v-else-if='state === "git"')
  205. .panel
  206. h2.panel-title.is-featured
  207. span Git Repository
  208. i(v-if='loading')
  209. .panel-content.is-text
  210. 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.
  211. .panel-content.form-sections
  212. section.columns
  213. .column.is-two-thirds
  214. p.control.is-fullwidth
  215. label.label Repository URL
  216. 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 }')
  217. span.desc The full git repository URL to connect to.
  218. .column
  219. p.control.is-fullwidth
  220. label.label Branch
  221. input(type='text', placeholder='e.g. master', v-model='conf.gitBranch', data-vv-scope='git', name='ipt-gitbranch', v-validate='{ required: true, min: 2 }')
  222. span.desc The git branch to use when synchronizing changes.
  223. section.columns
  224. .column.is-one-third
  225. p.control.is-fullwidth
  226. label.label Authentication
  227. select(v-model='conf.gitAuthType')
  228. option(value='ssh') SSH (recommended)
  229. option(value='basic') Basic
  230. span.desc The authentication method used to connect to your remote Git repository.
  231. p.control.is-fullwidth
  232. input#ipt-git-verify-ssl(type='checkbox', v-model='conf.gitAuthSSL')
  233. label.label(for='ipt-git-verify-ssl') Verify SSL
  234. .column(v-show='conf.gitAuthType === "basic"')
  235. p.control.is-fullwidth
  236. label.label Username
  237. input(type='text', v-model='conf.gitAuthUser')
  238. span.desc The username for the remote git connection.
  239. .column(v-show='conf.gitAuthType === "basic"')
  240. p.control.is-fullwidth
  241. label.label Password
  242. input(type='password', v-model='conf.gitAuthPass')
  243. span.desc The password for the remote git connection.
  244. .column(v-show='conf.gitAuthType === "ssh"')
  245. p.control.is-fullwidth
  246. label.label Private Key location
  247. input(type='text', placeholder='e.g. /etc/wiki/keys/git.pem', v-model='conf.gitAuthSSHKey')
  248. span.desc The full path to the private key on disk.
  249. section.columns
  250. .column.is-one-third
  251. p.control.is-fullwidth
  252. input#ipt-git-show-user-email(type='checkbox', v-model='conf.gitShowUserEmail')
  253. label.label(for='ipt-git-show-user-email') Commit using User Email
  254. 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.
  255. .column
  256. p.control.is-fullwidth
  257. label.label Default Commit Author Email
  258. 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 }')
  259. span.desc The default/fallback email to use when creating commits to the git repository.
  260. .panel-footer
  261. .progress-bar: div(v-bind:style='{width: currentProgress}')
  262. button.button.is-light-blue.is-outlined(v-on:click='proceedToPaths', v-bind:disabled='loading') Back
  263. button.button.is-light-blue.is-outlined(v-on:click='conf.gitUseRemote = false; proceedToGitCheck()', v-bind:disabled='loading') Skip this step
  264. button.button.is-light-blue(v-on:click='conf.gitUseRemote = true; proceedToGitCheck()', v-bind:disabled='loading || errors.any("git")') Continue
  265. //- ==============================================
  266. //- GIT CHECK
  267. //- ==============================================
  268. template(v-else-if='state === "gitcheck"')
  269. .panel
  270. h2.panel-title.is-featured
  271. span Git Repository Check
  272. i(v-if='loading')
  273. .panel-content.is-text
  274. p(v-if='loading') #[i.icon-loader.animated.rotateIn.infinite] Verifying Git repository settings...
  275. p(v-if='!loading && gitcheck.ok')
  276. ul
  277. li(v-for='rs in gitcheck.results') #[i.icon-check] {{rs}}
  278. p(v-if='!loading && gitcheck.ok')
  279. i.icon-check
  280. strong Git settings are correct!
  281. p(v-if='!loading && !gitcheck.ok') #[i.icon-square-cross] Error: {{ gitcheck.error }}
  282. .panel-footer
  283. .progress-bar: div(v-bind:style='{width: currentProgress}')
  284. button.button.is-light-blue.is-outlined(v-on:click='proceedToGit', v-bind:disabled='loading') Back
  285. button.button.is-teal(v-on:click='proceedToGitCheck', v-if='!loading && !gitcheck.ok') Try Again
  286. button.button.is-light-blue(v-on:click='proceedToAdmin', v-if='loading || gitcheck.ok', v-bind:disabled='loading') Continue
  287. //- ==============================================
  288. //- ADMINISTRATOR ACCOUNT
  289. //- ==============================================
  290. template(v-else-if='state === "admin"')
  291. .panel
  292. h2.panel-title.is-featured
  293. span Administrator Account
  294. i(v-if='loading')
  295. .panel-content.is-text
  296. p An administrator account will be created for local authentication. From this account, you can create or authorize more users.
  297. .panel-content.form-sections
  298. section
  299. p.control.is-fullwidth
  300. label.label Administrator Email
  301. 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 }')
  302. span.desc The email address of the administrator account
  303. section.columns
  304. .column
  305. p.control.is-fullwidth
  306. label.label Password
  307. input(type='password', v-model='conf.adminPassword', data-vv-scope='admin', name='ipt-adminpwd', v-validate='{ required: true, min: 8 }')
  308. span.desc At least 8 characters long.
  309. .column
  310. p.control.is-fullwidth
  311. label.label Confirm Password
  312. input(type='password', v-model='conf.adminPasswordConfirm', data-vv-scope='admin', name='ipt-adminpwd2', v-validate='{ required: true, confirmed: "ipt-adminpwd" }')
  313. span.desc Verify your password again.
  314. .panel-footer
  315. .progress-bar: div(v-bind:style='{width: currentProgress}')
  316. button.button.is-light-blue.is-outlined(v-on:click='proceedToGit', v-bind:disabled='loading') Back
  317. button.button.is-light-blue(v-on:click='proceedToFinal', v-bind:disabled='loading || errors.any("admin")') Continue
  318. //- ==============================================
  319. //- FINAL
  320. //- ==============================================
  321. template(v-else-if='state === "final"')
  322. .panel
  323. h2.panel-title.is-featured
  324. span Finalizing
  325. i(v-if='loading')
  326. .panel-content.is-text
  327. p(v-if='loading') #[i.icon-loader.animated.rotateIn.infinite] Finalizing your installation...
  328. p(v-if='!loading && final.ok')
  329. i.icon-check
  330. strong Wiki.js was configured successfully and is now ready for use.
  331. p(v-if='!loading && final.ok')
  332. | Click the <strong>Start</strong> button below to start the Wiki.js server.
  333. p(v-if='!loading && !final.ok') #[i.icon-square-cross] Error: {{ final.error }}
  334. .panel-footer
  335. .progress-bar: div(v-bind:style='{width: currentProgress}')
  336. button.button.is-light-blue.is-outlined(v-on:click='proceedToAdmin', v-bind:disabled='loading') Back
  337. button.button.is-teal(v-on:click='proceedToFinal', v-if='!loading && !final.ok') Try Again
  338. button.button.is-green(v-on:click='finish', v-if='loading || final.ok', v-bind:disabled='loading') Start
  339. //- ==============================================
  340. //- RESTART
  341. //- ==============================================
  342. template(v-else-if='state === "restart"')
  343. .panel
  344. h2.panel-title.is-featured
  345. span Restarting...
  346. i
  347. .panel-content.is-text
  348. p #[i.icon-loader.animated.rotateIn.infinite] Restarting Wiki.js in normal mode...
  349. p You'll automatically be redirected to the homepage when ready. This usually takes about 30 seconds.
  350. .panel-footer
  351. button.button.is-green(disabled='disabled') Start
  352. footer.footer
  353. span
  354. | Powered by
  355. a(href='https://github.com/Requarks/wiki') Wiki.js
  356. | .
  357. block outside