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.

379 lines
23 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(style={'padding-bottom': '5px'}, v-if='state === "welcome" || state === "restart"')
  27. img(src='/favicons/android-icon-96x96.png', alt='Wiki.js')
  28. h1 Welcome to Wiki.js!
  29. h2(style={'margin-bottom': 0}) 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 Introduction
  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-indigo(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-indigo.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-indigo(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, url: true }')
  85. 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.
  86. section
  87. p.control
  88. label.label Port
  89. 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: 1, max_value: 65535 }')
  90. 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.
  91. section
  92. p.control
  93. label.label Site UI Language
  94. select(v-model='conf.lang')
  95. each lg in langs
  96. option(value=lg.id)= lg.name
  97. span.desc The language in which navigation, help and other UI elements will be displayed.
  98. .panel-footer
  99. .progress-bar: div(v-bind:style='{width: currentProgress}')
  100. button.button.is-indigo.is-outlined(v-on:click='proceedToSyscheck', v-bind:disabled='loading') Back
  101. button.button.is-indigo(v-on:click='proceedToConsiderations', v-bind:disabled='loading || errors.any("general")') Continue
  102. //- ==============================================
  103. //- CONSIDERATIONS
  104. //- ==============================================
  105. template(v-else-if='state === "considerations"')
  106. .panel
  107. h2.panel-title.is-featured
  108. span Important Considerations
  109. i(v-if='loading')
  110. .panel-content.is-text
  111. h3 Is Wiki.js going to be behind a web server (e.g. nginx / apache / IIS) or proxy?
  112. p
  113. ul
  114. li - Make sure the upload limit is sufficient. Most web servers have a low limit (e.g. 2 MB) by default.
  115. li - Make sure your web server is configured to allow web sockets. Wiki.js will fallback to standard XHR queries if not available.
  116. li - Do not rewrite URLs after the domain. This can cause unexpected issues in Wiki.js navigation.
  117. li - Do not remove or alter the client IP when proxying the requests. This can cause the authentication brute force protection to engage unexpectedly.
  118. template(v-if='considerations.https')
  119. h3 The site will not be using HTTPS? #[i.icon-warning-outline.animated.fadeOut.infinite]
  120. 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.
  121. template(v-if='considerations.port')
  122. h3 You are using a non-standard port.
  123. 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.
  124. template(v-if='considerations.localhost')
  125. h3 Are you sure you want to use localhost as the host base URL? #[i.icon-warning-outline.animated.fadeOut.infinite]
  126. p The host URL you specified is localhost. Unless you are a developer running Wiki.js locally on your machine, this is not recommended!
  127. .panel-footer
  128. .progress-bar: div(v-bind:style='{width: currentProgress}')
  129. button.button.is-indigo.is-outlined(v-on:click='proceedToGeneral', v-bind:disabled='loading') Back
  130. button.button.is-indigo(v-on:click='proceedToDb', v-bind:disabled='loading') Continue
  131. //- ==============================================
  132. //- DATABASE
  133. //- ==============================================
  134. template(v-else-if='state === "db"')
  135. .panel
  136. h2.panel-title.is-featured
  137. span Database
  138. i(v-if='loading')
  139. .panel-content.is-text
  140. 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.
  141. .panel-content.form-sections
  142. section
  143. p.control.is-fullwidth
  144. label.label MongoDB Connection String
  145. 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: 14 }')
  146. span.desc The connection string to your MongoDB server. Leave the default localhost value if MongoDB is installed on the same server.
  147. .panel-footer
  148. .progress-bar: div(v-bind:style='{width: currentProgress}')
  149. button.button.is-indigo.is-outlined(v-on:click='proceedToConsiderations', v-bind:disabled='loading') Back
  150. button.button.is-indigo(v-on:click='proceedToDbcheck', v-bind:disabled='loading || errors.any("db")') Connect
  151. //- ==============================================
  152. //- DATABASE CHECK
  153. //- ==============================================
  154. template(v-else-if='state === "dbcheck"')
  155. .panel
  156. h2.panel-title.is-featured
  157. span Database Check
  158. i(v-if='loading')
  159. .panel-content.is-text
  160. p(v-if='loading') #[i.icon-loader.animated.rotateIn.infinite] Testing the connection to MongoDB...
  161. p(v-if='!loading && dbcheck.ok')
  162. i.icon-check
  163. strong Connected successfully!
  164. p(v-if='!loading && !dbcheck.ok') #[i.icon-square-cross] Error: {{ dbcheck.error }}
  165. .panel-footer
  166. .progress-bar: div(v-bind:style='{width: currentProgress}')
  167. button.button.is-indigo.is-outlined(v-on:click='proceedToDb', v-bind:disabled='loading') Back
  168. button.button.is-teal(v-on:click='proceedToDbcheck', v-if='!loading && !dbcheck.ok') Try Again
  169. button.button.is-indigo(v-on:click='proceedToPaths', v-if='loading || dbcheck.ok', v-bind:disabled='loading') Continue
  170. //- ==============================================
  171. //- PATHS
  172. //- ==============================================
  173. template(v-else-if='state === "paths"')
  174. .panel
  175. h2.panel-title.is-featured
  176. span Paths
  177. i(v-if='loading')
  178. .panel-content.is-text
  179. p It is recommended to leave the default values.
  180. .panel-content.form-sections
  181. section
  182. p.control.is-fullwidth
  183. label.label Local Data Path
  184. input(type='text', placeholder='e.g. ./data', v-model='conf.pathData', data-vv-scope='paths', name='ipt-datapath', v-validate='{ required: true, min: 2 }')
  185. span.desc The path where cache (processed content, thumbnails, search index, etc.) will be stored on disk.
  186. section
  187. p.control.is-fullwidth
  188. label.label Local Repository Path
  189. input(type='text', placeholder='e.g. ./repo', v-model='conf.pathRepo', data-vv-scope='paths', name='ipt-repopath', v-validate='{ required: true, min: 2 }')
  190. span.desc The path where the local git repository will be created, used to store content in markdown files and uploads.
  191. .panel-footer
  192. .progress-bar: div(v-bind:style='{width: currentProgress}')
  193. button.button.is-indigo.is-outlined(v-on:click='proceedToDb', v-bind:disabled='loading') Back
  194. button.button.is-indigo(v-on:click='proceedToGit', v-bind:disabled='loading || errors.any("paths")') Continue
  195. //- ==============================================
  196. //- GIT
  197. //- ==============================================
  198. template(v-else-if='state === "git"')
  199. .panel
  200. h2.panel-title.is-featured
  201. span Git Repository
  202. i(v-if='loading')
  203. .panel-content.is-text
  204. 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.
  205. .panel-content.form-sections
  206. section.columns
  207. .column.is-two-thirds
  208. p.control.is-fullwidth
  209. label.label Repository URL
  210. 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 }')
  211. span.desc The full git repository URL to connect to.
  212. .column
  213. p.control.is-fullwidth
  214. label.label Branch
  215. input(type='text', placeholder='e.g. master', v-model='conf.gitBranch', data-vv-scope='git', name='ipt-gitbranch', v-validate='{ required: true, min: 2 }')
  216. span.desc The git branch to use when synchronizing changes.
  217. section.columns
  218. .column.is-one-third
  219. p.control.is-fullwidth
  220. label.label Authentication
  221. select(v-model='conf.gitAuthType')
  222. option(value='ssh') SSH (recommended)
  223. option(value='basic') Basic
  224. span.desc The authentication method used to connect to your remote Git repository.
  225. p.control.is-fullwidth
  226. input#ipt-git-verify-ssl(type='checkbox', v-model='conf.gitAuthSSL')
  227. label.label(for='ipt-git-verify-ssl') Verify SSL
  228. .column(v-show='conf.gitAuthType === "basic"')
  229. p.control.is-fullwidth
  230. label.label Username
  231. input(type='text', v-model='conf.gitAuthUser')
  232. span.desc The username for the remote git connection.
  233. .column(v-show='conf.gitAuthType === "basic"')
  234. p.control.is-fullwidth
  235. label.label Password
  236. input(type='password', v-model='conf.gitAuthPass')
  237. span.desc The password for the remote git connection.
  238. .column(v-show='conf.gitAuthType === "ssh"')
  239. p.control.is-fullwidth
  240. label.label Private Key location
  241. input(type='text', placeholder='e.g. /etc/wiki/keys/git.pem', v-model='conf.gitAuthSSHKey')
  242. span.desc The full path to the private key on disk.
  243. section.columns
  244. .column
  245. p.control.is-fullwidth
  246. label.label Sync User Name
  247. input(type='text', placeholder='e.g. John Smith', v-model.number='conf.gitSignatureName', data-vv-scope='git', name='ipt-gitsigname', v-validate='{ required: true }')
  248. span.desc The name to use when pushing commits to the git repository.
  249. .column
  250. p.control.is-fullwidth
  251. label.label Sync User Email
  252. input(type='text', placeholder='e.g. user@example.com', v-model.number='conf.gitSignatureEmail', data-vv-scope='git', name='ipt-gitsigemail', v-validate='{ required: true, email: true }')
  253. span.desc The email to use when pushing commits to the git repository.
  254. .panel-footer
  255. .progress-bar: div(v-bind:style='{width: currentProgress}')
  256. button.button.is-indigo.is-outlined(v-on:click='proceedToPaths', v-bind:disabled='loading') Back
  257. button.button.is-indigo.is-outlined(v-on:click='conf.gitUseRemote = false; proceedToGitCheck()', v-bind:disabled='loading') Skip this step
  258. button.button.is-indigo(v-on:click='conf.gitUseRemote = true; proceedToGitCheck()', v-bind:disabled='loading || errors.any("git")') Continue
  259. //- ==============================================
  260. //- GIT CHECK
  261. //- ==============================================
  262. template(v-else-if='state === "gitcheck"')
  263. .panel
  264. h2.panel-title.is-featured
  265. span Git Repository Check
  266. i(v-if='loading')
  267. .panel-content.is-text
  268. p(v-if='loading') #[i.icon-loader.animated.rotateIn.infinite] Verifying Git repository settings...
  269. p(v-if='!loading && gitcheck.ok')
  270. ul
  271. li(v-for='rs in gitcheck.results') #[i.icon-check] {{rs}}
  272. p(v-if='!loading && gitcheck.ok')
  273. i.icon-check
  274. strong Git settings are correct!
  275. p(v-if='!loading && !gitcheck.ok') #[i.icon-square-cross] Error: {{ gitcheck.error }}
  276. .panel-footer
  277. .progress-bar: div(v-bind:style='{width: currentProgress}')
  278. button.button.is-indigo.is-outlined(v-on:click='proceedToGit', v-bind:disabled='loading') Back
  279. button.button.is-teal(v-on:click='proceedToGitCheck', v-if='!loading && !gitcheck.ok') Try Again
  280. button.button.is-indigo(v-on:click='proceedToAdmin', v-if='loading || gitcheck.ok', v-bind:disabled='loading') Continue
  281. //- ==============================================
  282. //- ADMINISTRATOR ACCOUNT
  283. //- ==============================================
  284. template(v-else-if='state === "admin"')
  285. .panel
  286. h2.panel-title.is-featured
  287. span Administrator Account
  288. i(v-if='loading')
  289. .panel-content.is-text
  290. p An administrator account will be created for local authentication. From this account, you can create or authorize more users.
  291. .panel-content.form-sections
  292. section
  293. p.control.is-fullwidth
  294. label.label Administrator Email
  295. 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 }')
  296. span.desc The email address of the administrator account
  297. section.columns
  298. .column
  299. p.control.is-fullwidth
  300. label.label Password
  301. input(type='password', v-model='conf.adminPassword', data-vv-scope='admin', name='ipt-adminpwd', v-validate='{ required: true, min: 8 }')
  302. span.desc At least 8 characters long.
  303. .column
  304. p.control.is-fullwidth
  305. label.label Confirm Password
  306. input(type='password', v-model='conf.adminPasswordConfirm', data-vv-scope='admin', name='ipt-adminpwd2', v-validate='{ required: true, confirmed: "ipt-adminpwd" }')
  307. span.desc Verify your password again.
  308. .panel-footer
  309. .progress-bar: div(v-bind:style='{width: currentProgress}')
  310. button.button.is-indigo.is-outlined(v-on:click='proceedToGit', v-bind:disabled='loading') Back
  311. button.button.is-indigo(v-on:click='proceedToFinal', v-bind:disabled='loading || errors.any("admin")') Continue
  312. //- ==============================================
  313. //- FINAL
  314. //- ==============================================
  315. template(v-else-if='state === "final"')
  316. .panel
  317. h2.panel-title.is-featured
  318. span Finalizing
  319. i(v-if='loading')
  320. .panel-content.is-text
  321. p(v-if='loading') #[i.icon-loader.animated.rotateIn.infinite] Finalizing your installation...
  322. p(v-if='!loading && final.ok')
  323. i.icon-check
  324. strong Wiki.js was configured successfully and is now ready for use.
  325. p(v-if='!loading && final.ok')
  326. | Click the <strong>Start</strong> button below to start the Wiki.js server.
  327. p(v-if='!loading && !final.ok') #[i.icon-square-cross] Error: {{ final.error }}
  328. .panel-footer
  329. .progress-bar: div(v-bind:style='{width: currentProgress}')
  330. button.button.is-indigo.is-outlined(v-on:click='proceedToAdmin', v-bind:disabled='loading') Back
  331. button.button.is-teal(v-on:click='proceedToFinal', v-if='!loading && !final.ok') Try Again
  332. button.button.is-green(v-on:click='finish', v-if='loading || final.ok', v-bind:disabled='loading') Start
  333. //- ==============================================
  334. //- RESTART
  335. //- ==============================================
  336. template(v-else-if='state === "restart"')
  337. .panel
  338. h2.panel-title.is-featured
  339. span Restarting...
  340. i
  341. .panel-content.is-text
  342. p #[i.icon-loader.animated.rotateIn.infinite] Restarting Wiki.js in normal mode...
  343. p You'll automatically be redirected to the homepage when ready. This usually takes about 30 seconds.
  344. .panel-footer
  345. button.button.is-green(disabled='disabled') Start
  346. footer.footer
  347. span
  348. | Powered by
  349. a(href='https://github.com/Requarks/wiki') Wiki.js
  350. | .
  351. block outside