index.pug 23 KB

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