index.pug 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. extends ../master.pug
  2. block body
  3. body
  4. #app.config-manager
  5. config-manager(inline-template)
  6. .container
  7. transition(name='tst-welcome')
  8. .welcome(v-if='state === "welcome" || state === "restart"')
  9. img(src='/images/logo.png', alt='Wiki.js')
  10. h2 A modern, lightweight and powerful wiki app built on NodeJS, Git and Markdown
  11. .content(v-cloak)
  12. //- ==============================================
  13. //- WELCOME
  14. //- ==============================================
  15. template(v-if='state === "welcome"')
  16. .panel
  17. h2.panel-title.is-featured
  18. span Welcome!
  19. i(v-if='loading')
  20. .panel-content.is-text
  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 #[i.nc-icon-outline.tech_cd-reader] You are about to install Wiki.js #[strong= packageObj.version].
  26. section
  27. p.control.is-fullwidth
  28. input#ipt-telemetry(type='checkbox', v-model='conf.telemetry', name='ipt-telemetry')
  29. label.label(for='ipt-telemetry') Allow Telemetry
  30. span.desc Help Wiki.js developers improve this app with anonymized #[a(href='https://wiki.requarks.io/docs/telemetry') telemetry].
  31. p.control.is-fullwidth
  32. input#ipt-upgrade(type='checkbox', v-model='conf.upgrade', name='ipt-upgrade')
  33. label.label(for='ipt-upgrade') Upgrade from Wiki.js 1.x
  34. span.desc Check this box if you are upgrading from Wiki.js 1.x and wish to migrate your existing data.
  35. .panel-footer
  36. .progress-bar: div(v-bind:style='{width: currentProgress}')
  37. button.button.is-small.is-light-blue(v-on:click='proceedToSyscheck', v-bind:disabled='loading') Start
  38. //- ==============================================
  39. //- SYSTEM CHECK
  40. //- ==============================================
  41. template(v-else-if='state === "syscheck"')
  42. .panel
  43. h2.panel-title.is-featured
  44. span System Check
  45. i(v-if='loading')
  46. .panel-content.is-text
  47. p(v-if='loading') #[i.icon-loader.animated.rotateIn.infinite] Checking your system for compatibility...
  48. p(v-if='!loading && syscheck.ok')
  49. ul
  50. li(v-for='rs in syscheck.results') #[i.icon-check] {{rs}}
  51. p(v-if='!loading && syscheck.ok')
  52. i.icon-check
  53. strong Looks good! No issues so far.
  54. p(v-if='!loading && !syscheck.ok') #[i.icon-square-cross] Error: {{ syscheck.error }}
  55. .panel-footer
  56. .progress-bar: div(v-bind:style='{width: currentProgress}')
  57. button.button.is-small.is-light-blue.is-outlined(v-on:click='proceedToWelcome', v-bind:disabled='loading') Back
  58. button.button.is-small.is-teal(v-on:click='proceedToSyscheck', v-if='!loading && !syscheck.ok') Check Again
  59. button.button.is-small.is-red.is-outlined(v-on:click='proceedToGeneral', v-if='!loading && !syscheck.ok') Continue Anyway
  60. button.button.is-small.is-light-blue(v-on:click='proceedToGeneral', v-if='loading || syscheck.ok', v-bind:disabled='loading') Continue
  61. //- ==============================================
  62. //- GENERAL
  63. //- ==============================================
  64. template(v-else-if='state === "general"')
  65. .panel
  66. h2.panel-title.is-featured
  67. span General
  68. i(v-if='loading')
  69. .panel-content.form-sections
  70. section
  71. p.control.is-fullwidth
  72. label.label Site Title
  73. input(type='text', placeholder='e.g. Wiki', v-model='conf.title', data-vv-scope='general', name='ipt-title', v-validate='{ required: true, min: 2 }')
  74. span.desc The site title will appear in the top left corner on every page and within the window title bar.
  75. section
  76. p.control.is-fullwidth
  77. label.label Host
  78. input(type='text', placeholder='http://', v-model='conf.host', data-vv-scope='general', name='ipt-host', v-validate='{ required: true, min: 4 }')
  79. span.desc The full URL to your wiki, without the trailing slash, e.g.: http://wiki.domain.com. Make sure to include the port if different than 80/443.
  80. section
  81. p.control
  82. label.label Port
  83. input(type='text', placeholder='e.g. 80', v-model.number='conf.port', data-vv-scope='general', name='ipt-port', v-validate='{ required: true }')
  84. 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.
  85. section
  86. p.control
  87. label.label Site UI Language
  88. select(v-model='conf.lang')
  89. each lg in data.langs
  90. option(value=lg.id)= lg.name
  91. span.desc The language in which navigation, help and other UI elements will be displayed.
  92. section
  93. p.control.is-fullwidth
  94. label.label Local Repository Path
  95. input(type='text', placeholder='e.g. ./repo', v-model='conf.pathRepo', data-vv-scope='general', name='ipt-repopath', v-validate='{ required: true, min: 2 }')
  96. 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].
  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-small.is-light-blue.is-outlined(v-on:click='proceedToSyscheck', v-bind:disabled='loading') Back
  105. button.button.is-small.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.nc-icon-outline.ui-3_alert.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.nc-icon-outline.ui-3_alert.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-small.is-light-blue.is-outlined(v-on:click='proceedToGeneral', v-bind:disabled='loading') Back
  134. button.button.is-small.is-light-blue(v-on:click='proceedToGit', v-bind:disabled='loading') Continue
  135. //- ==============================================
  136. //- GIT
  137. //- ==============================================
  138. template(v-else-if='state === "git"')
  139. .panel
  140. h2.panel-title.is-featured
  141. span Git Repository
  142. i(v-if='loading')
  143. .panel-content.is-text
  144. 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.
  145. .panel-content.form-sections
  146. section.columns
  147. .column.is-two-thirds
  148. p.control.is-fullwidth
  149. label.label Repository URL
  150. 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 }')
  151. span.desc The full git repository URL to connect to.
  152. .column
  153. p.control.is-fullwidth
  154. label.label Branch
  155. input(type='text', placeholder='e.g. master', v-model='conf.gitBranch', data-vv-scope='git', name='ipt-gitbranch', v-validate='{ required: true, min: 2 }')
  156. span.desc The git branch to use when synchronizing changes.
  157. section.columns
  158. .column.is-one-third
  159. p.control.is-fullwidth
  160. label.label Authentication
  161. select(v-model='conf.gitAuthType')
  162. option(value='ssh') SSH (recommended)
  163. option(value='basic') Basic
  164. span.desc The authentication method used to connect to your remote Git repository.
  165. p.control.is-fullwidth
  166. input#ipt-git-verify-ssl(type='checkbox', v-model='conf.gitAuthSSL')
  167. label.label(for='ipt-git-verify-ssl') Verify SSL
  168. .column(v-show='conf.gitAuthType === "basic"')
  169. p.control.is-fullwidth
  170. label.label Username
  171. input(type='text', v-model='conf.gitAuthUser')
  172. span.desc The username for the remote git connection.
  173. .column(v-show='conf.gitAuthType === "basic"')
  174. p.control.is-fullwidth
  175. label.label Password
  176. input(type='password', v-model='conf.gitAuthPass')
  177. span.desc The password for the remote git connection.
  178. .column(v-show='conf.gitAuthType === "ssh"')
  179. p.control.is-fullwidth
  180. label.label Private Key location
  181. input(type='text', placeholder='e.g. /etc/wiki/keys/git.pem', v-model='conf.gitAuthSSHKey')
  182. span.desc The full path to the private key on disk.
  183. section.columns
  184. .column.is-one-third
  185. p.control.is-fullwidth
  186. input#ipt-git-show-user-email(type='checkbox', v-model='conf.gitShowUserEmail')
  187. label.label(for='ipt-git-show-user-email') Commit using User Email
  188. 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.
  189. .column
  190. p.control.is-fullwidth
  191. label.label Default Commit Author Email
  192. 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 }')
  193. span.desc The default/fallback email to use when creating commits to the git repository.
  194. .panel-footer
  195. .progress-bar: div(v-bind:style='{width: currentProgress}')
  196. button.button.is-small.is-light-blue.is-outlined(v-on:click='proceedToGeneral', v-bind:disabled='loading') Back
  197. button.button.is-small.is-light-blue.is-outlined(v-on:click='conf.gitUseRemote = false; proceedToGitCheck()', v-bind:disabled='loading') Skip this step
  198. button.button.is-small.is-light-blue(v-on:click='conf.gitUseRemote = true; proceedToGitCheck()', v-bind:disabled='loading || errors.any("git")') Continue
  199. //- ==============================================
  200. //- GIT CHECK
  201. //- ==============================================
  202. template(v-else-if='state === "gitcheck"')
  203. .panel
  204. h2.panel-title.is-featured
  205. span Git Repository Check
  206. i(v-if='loading')
  207. .panel-content.is-text
  208. p(v-if='loading') #[i.icon-loader.animated.rotateIn.infinite] Verifying Git repository settings...
  209. p(v-if='!loading && gitcheck.ok')
  210. ul
  211. li(v-for='rs in gitcheck.results') #[i.icon-check] {{rs}}
  212. p(v-if='!loading && gitcheck.ok')
  213. i.icon-check
  214. strong Git settings are correct!
  215. p(v-if='!loading && !gitcheck.ok') #[i.icon-square-cross] Error: {{ gitcheck.error }}
  216. .panel-footer
  217. .progress-bar: div(v-bind:style='{width: currentProgress}')
  218. button.button.is-small.is-light-blue.is-outlined(v-on:click='proceedToGit', v-bind:disabled='loading') Back
  219. button.button.is-small.is-teal(v-on:click='proceedToGitCheck', v-if='!loading && !gitcheck.ok') Try Again
  220. button.button.is-small.is-light-blue(v-on:click='proceedToAdmin', v-if='loading || gitcheck.ok', v-bind:disabled='loading') Continue
  221. //- ==============================================
  222. //- ADMINISTRATOR ACCOUNT
  223. //- ==============================================
  224. template(v-else-if='state === "admin"')
  225. .panel
  226. h2.panel-title.is-featured
  227. span Administrator Account
  228. i(v-if='loading')
  229. .panel-content.is-text
  230. p An administrator account will be created for local authentication. From this account, you can create or authorize more users.
  231. .panel-content.form-sections
  232. section
  233. p.control.is-fullwidth
  234. label.label Administrator Email
  235. 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 }')
  236. span.desc The email address of the administrator account
  237. section.columns
  238. .column
  239. p.control.is-fullwidth
  240. label.label Password
  241. input(type='password', v-model='conf.adminPassword', data-vv-scope='admin', name='ipt-adminpwd', v-validate='{ required: true, min: 8 }')
  242. span.desc At least 8 characters long.
  243. .column
  244. p.control.is-fullwidth
  245. label.label Confirm Password
  246. input(type='password', v-model='conf.adminPasswordConfirm', data-vv-scope='admin', name='ipt-adminpwd2', v-validate='{ required: true, confirmed: "ipt-adminpwd" }')
  247. span.desc Verify your password again.
  248. .panel-footer
  249. .progress-bar: div(v-bind:style='{width: currentProgress}')
  250. button.button.is-small.is-light-blue.is-outlined(v-on:click='proceedToGit', v-bind:disabled='loading') Back
  251. button.button.is-small.is-light-blue(v-on:click='proceedToFinal', v-bind:disabled='loading || errors.any("admin")') Continue
  252. //- ==============================================
  253. //- FINAL
  254. //- ==============================================
  255. template(v-else-if='state === "final"')
  256. .panel
  257. h2.panel-title.is-featured
  258. span Finalizing
  259. i(v-if='loading')
  260. .panel-content.is-text
  261. p(v-if='loading') #[i.icon-loader.animated.rotateIn.infinite] Finalizing your installation...
  262. p(v-if='!loading && final.ok')
  263. i.icon-check
  264. strong Wiki.js was configured successfully and is now ready for use.
  265. p(v-if='!loading && final.ok')
  266. | Click the <strong>Start</strong> button below to start the Wiki.js server.
  267. p(v-if='!loading && !final.ok') #[i.icon-square-cross] Error: {{ final.error }}
  268. .panel-footer
  269. .progress-bar: div(v-bind:style='{width: currentProgress}')
  270. button.button.is-small.is-light-blue.is-outlined(v-on:click='proceedToAdmin', v-bind:disabled='loading') Back
  271. button.button.is-small.is-teal(v-on:click='proceedToFinal', v-if='!loading && !final.ok') Try Again
  272. button.button.is-small.is-green(v-on:click='finish', v-if='loading || final.ok', v-bind:disabled='loading') Start
  273. //- ==============================================
  274. //- RESTART
  275. //- ==============================================
  276. template(v-else-if='state === "restart"')
  277. .panel
  278. h2.panel-title.is-featured
  279. span Restarting...
  280. i
  281. .panel-content.is-text
  282. p #[i.icon-loader.animated.rotateIn.infinite] Restarting Wiki.js in normal mode...
  283. p You'll automatically be redirected to the homepage when ready. This usually takes about 30 seconds.
  284. .panel-footer
  285. button.button.is-small.is-green(disabled='disabled') Start