index.pug 22 KB

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