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.

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