index.pug 23 KB

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