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.

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